diff options
Diffstat (limited to 'doc/development/fe_guide/graphql.md')
-rw-r--r-- | doc/development/fe_guide/graphql.md | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/doc/development/fe_guide/graphql.md b/doc/development/fe_guide/graphql.md index 68c0c1e3370..a9821edff0b 100644 --- a/doc/development/fe_guide/graphql.md +++ b/doc/development/fe_guide/graphql.md @@ -425,10 +425,12 @@ It is also possible to use GraphQL outside of Vue by directly importing and using the default client with queries. ```javascript -import defaultClient from '~/lib/graphql'; +import createDefaultClient from '~/lib/graphql'; import query from './query.graphql'; -defaultClient.query(query) +const defaultClient = createDefaultClient(); + +defaultClient.query({ query }) .then(result => console.log(result)); ``` |