nuxt-modules / apollo

Nuxt.js module to use Vue-Apollo. The Apollo integration for GraphQL.
https://apollo.nuxtjs.org
MIT License
929 stars 194 forks source link

Can't access result.value after successful query on first load #606

Open mathieuCatapulpe opened 3 months ago

mathieuCatapulpe commented 3 months ago

Environment

Describe the bug

After a successful query using either useAsyncQuery or useQuery I can console.log my result, but when trying to access result.value it returns null as shown in the example bellow

import fetchProgramme from "~/config/graphql/preview/programme.graphql"
    const { result } = useQuery(
        fetchProgramme ,
        {id: previewId},
    );

    console.log('result : ' , result)
    console.log('result.value : ' , result.value)

image

Expected behaviour

Being able to access result.value

Reproduction

No response

Additional context

Also tried :

Logs

No response

atenazr commented 1 month ago

i have this issue too!