Provide DefaultApolloClient from Apollo Composable to your Vue 3 App

Share this video with your friends

Send Tweet

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.