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

fix: TAsyncQuery type and context value as 4th argument #571

Closed TimvdEijnden closed 7 months ago

TimvdEijnden commented 7 months ago

The type TAsyncQuery was missing the context property

type TAsyncQuery<T> = {
  cache?: boolean,
  context?: DefaultContext,
  clientId?: string,
  key?: string,
  query: TQuery<T>,
  variables?: TVariables<T>,
}

Also when passing the context as a 4th argument to useAsyncQuery it would not be applied because it was only checking the options args?.[0]?.context now it also uses args?.[3] and clientId is the 3rd one so it should be args?.[2].

netlify[bot] commented 7 months ago

Deploy Preview for apollo-module canceled.

Name Link
Latest commit b872ddae7d8a79248ddef930c6756b6846e6a127
Latest deploy log https://app.netlify.com/sites/apollo-module/deploys/655b67ea46b7870008055da9