Create a Data-Driven Vue 3 Component with Apollo

Share this video with your friends

Send Tweet

Time to use the Apollo client and Vue Apollo Composable to make a query and use the resulting data in our Vue component.

To make this happen we'll be using the useQuery and useResult composables to make the query and use its result. Then we'll take that data and loop over it using v-for.

~ 2 years ago

Hi, the useResult is going to be deprecated so instead they recommend to use const items = computed(() => result.value?.someField.myItems ?? [])