Course lesson
Provide DefaultApolloClient from Apollo Composable to your Vue 3 App
In order to use the useQuery composable to fetch data, you need to first import DefaultApolloClient from @vue/apollo-composable
- Duration
- 2 min
- Access
- Included
- Transcript
- Retained from source evidence
In order to use the useQuery composable to fetch data, you need to first import DefaultApolloClient from @vue/apollo-composable
Then in your createApp you need to provide the DefaultApolloClient to your app inside a setup function, then all of the child components will have access to it.