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