Skip to content

Commit

Permalink
docs: provideApolloClient (#1442)
Browse files Browse the repository at this point in the history
  • Loading branch information
hinogi authored Jun 12, 2023
1 parent c881439 commit d8f93bf
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/docs/src/guide-composable/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,12 @@ Use `provideApolloClient` for a single default client:
```js
import { provideApolloClient } from "@vue/apollo-composable";

provideApolloClient(apolloClient)
const query = provideApolloClient(apolloClient)(() => useQuery(gql`
query hello {
hello
}
`))
const hello = computed(() => query.result.value?.hello ?? '')
```
Use `provideApolloClients` for multiple clients:
Expand Down

0 comments on commit d8f93bf

Please sign in to comment.