INNER CODE UNIT · TypeScript

useAsyncGql

Diizzayy/nuxt-graphql-client · src/runtime/composables/index.ts:302

export function useAsyncGql<
  T extends GqlOps,
  p extends Parameters<GqlSdkFuncs[T]>['0'],
  P extends { [K in keyof p]: Ref<p[K]> | p[K] } | Omit<Ref<p>, 'value'>,
  d extends Awaited<ReturnType<GqlSdkFuncs[T]>>,
  D = d,
  E = GqlError,
  PK extends KeysOf<D> = KeysOf<D>
>(
  options: {
    operation: T
    variables?: P
    options?: AsyncDataOptions<d, D, PK>
  }
): AsyncData<PickFrom<D, PK>, E | null>

/**
 * Asynchronously query data that is required to load a page or component.

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…