@lewebsimple/nuxt-graphql 0.6.19 → 0.6.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import type { QueryName, ResultOf, VariablesOf } from "#graphql/registry";
|
|
|
3
3
|
import { type MaybeRefOrGetter } from "#imports";
|
|
4
4
|
import type { NormalizedError } from "../../shared/lib/error.js";
|
|
5
5
|
import type { CacheConfig, IsEmptyObject } from "../../shared/lib/types.js";
|
|
6
|
-
type UseAsyncGraphQLQueryOptions<TName extends QueryName, TTransformed = ResultOf<TName>> = Omit<AsyncDataOptions<ResultOf<TName
|
|
6
|
+
type UseAsyncGraphQLQueryOptions<TName extends QueryName, TTransformed = ResultOf<TName>> = Omit<AsyncDataOptions<ResultOf<TName>, TTransformed, never>, "transform" | "pick"> & {
|
|
7
7
|
transform?: (input: ResultOf<TName>) => TTransformed;
|
|
8
8
|
cache?: Partial<CacheConfig>;
|
|
9
9
|
scope?: string;
|
|
@@ -15,5 +15,5 @@ type UseAsyncGraphQLQueryOptions<TName extends QueryName, TTransformed = ResultO
|
|
|
15
15
|
* @param args Operation variables (if any) and optional HTTP headers.
|
|
16
16
|
* @returns Nuxt AsyncData wrapper for the query result.
|
|
17
17
|
*/
|
|
18
|
-
export declare function useAsyncGraphQLQuery<TName extends QueryName, TTransformed
|
|
18
|
+
export declare function useAsyncGraphQLQuery<TName extends QueryName, TTransformed = ResultOf<TName>>(operationName: TName, ...args: IsEmptyObject<VariablesOf<TName>> extends true ? [variables?: MaybeRefOrGetter<VariablesOf<TName>>, options?: UseAsyncGraphQLQueryOptions<TName, TTransformed>] : [variables: MaybeRefOrGetter<VariablesOf<TName>>, options?: UseAsyncGraphQLQueryOptions<TName, TTransformed>]): AsyncData<TTransformed | undefined, NormalizedError | undefined>;
|
|
19
19
|
export {};
|