Commit 42dde46e authored by Simon Knox's avatar Simon Knox

Fix code example for GraphQL usage outside of Vue

parent b9940c46
...@@ -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