diff options
author | Phil Hughes <me@iamphill.com> | 2019-05-13 11:09:21 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2019-05-13 11:09:21 +0300 |
commit | e8fe08fca2277b77f6e42a59ac8946b6cb9db098 (patch) | |
tree | dff4ad00e0d2f2df03e5e65f3920a9351b86d156 | |
parent | 74511b049743cf543694bb92a8acd7e7586e533d (diff) | |
parent | f226d9ab02fa2568ce8058025ee1fa0bc04d8cdc (diff) |
Merge branch 'graphql-docs-fix' into 'master'
Update doc/development/fe_guide/graphql.md
See merge request gitlab-org/gitlab-ce!28272
-rw-r--r-- | doc/development/fe_guide/graphql.md | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/doc/development/fe_guide/graphql.md b/doc/development/fe_guide/graphql.md index 5f6123b5f9b..8e06aa5d173 100644 --- a/doc/development/fe_guide/graphql.md +++ b/doc/development/fe_guide/graphql.md @@ -43,9 +43,9 @@ new Vue({ Read more about [Vue Apollo][vue-apollo] in the [Vue Apollo documentation][vue-apollo-docs]. -### Local state with `apollo-link-state` +### Local state with Apollo -It is possible to use our Apollo setup with [apollo-link-state][apollo-link-state] by passing +It is possible to manage an application state with Apollo by passing in a resolvers object when creating the default client. The default state can be set by writing to the cache after setting up the default client. @@ -76,6 +76,8 @@ const apolloProvider = new VueApollo({ }); ``` +Read more about local state management with Apollo in the [Vue Apollo documentation](https://vue-apollo.netlify.com/guide/local-state.html#local-state). + ### Testing With [Vue test utils][vue-test-utils] it is easy to quickly test components that @@ -92,6 +94,8 @@ it('tests apollo component', () => { }); ``` +Another possible way is testing queries with mocked GraphQL schema. Read more about this way in [Vue Apollo testing documentation](https://vue-apollo.netlify.com/guide/testing.html#tests-with-mocked-graqhql-schema) + ## Usage outside of Vue It is also possible to use GraphQL outside of Vue by directly importing |