Commit 319fecf9 authored by Natalia Tepluhina's avatar Natalia Tepluhina

Merge branch 'patch-67' into 'master'

Fix code example for GraphQL usage outside of Vue

See merge request gitlab-org/gitlab!25114
parents e9abe4df 42dde46e
...@@ -425,10 +425,12 @@ It is also possible to use GraphQL outside of Vue by directly importing ...@@ -425,10 +425,12 @@ It is also possible to use GraphQL outside of Vue by directly importing
and using the default client with queries. and using the default client with queries.
```javascript ```javascript
import defaultClient from '~/lib/graphql'; import createDefaultClient from '~/lib/graphql';
import query from './query.graphql'; import query from './query.graphql';
defaultClient.query(query) const defaultClient = createDefaultClient();
defaultClient.query({ query })
.then(result => console.log(result)); .then(result => console.log(result));
``` ```
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment