diff --git a/node_modules/@apollo/react-hooks/lib/types.d.ts b/node_modules/@apollo/react-hooks/lib/types.d.ts index 37d9d63..85cb694 100644 --- a/node_modules/@apollo/react-hooks/lib/types.d.ts +++ b/node_modules/@apollo/react-hooks/lib/types.d.ts @@ -4,22 +4,24 @@ import { ApolloClient, ObservableQuery, ApolloError } from 'apollo-client'; import { Observable } from 'apollo-link'; import { OperationVariables, QueryFunctionOptions, QueryResult, BaseMutationOptions, MutationResult, MutationFunctionOptions, ExecutionResult, BaseSubscriptionOptions, SubscriptionResult, Context } from '@apollo/react-common'; import { DocumentNode } from 'graphql'; +import { TypedDocumentNode } from "@graphql-typed-document-node/core"; + export declare type CommonOptions = TOptions & { client?: ApolloClient; }; export interface QueryOptions extends QueryFunctionOptions { children?: (result: QueryResult) => ReactNode; - query: DocumentNode; + query: DocumentNode | TypedDocumentNode; } export interface QueryHookOptions extends QueryFunctionOptions { - query?: DocumentNode; + query?: DocumentNode | TypedDocumentNode; } export interface LazyQueryHookOptions extends Omit, 'skip'> { - query?: DocumentNode; + query?: DocumentNode | TypedDocumentNode; } export interface QueryPreviousData { client?: ApolloClient; - query?: DocumentNode; + query?: DocumentNode | TypedDocumentNode; observableQueryOptions?: {}; result?: QueryResult | null; loading?: boolean; @@ -36,17 +38,17 @@ export interface QueryLazyOptions { } export declare type QueryTuple = [(options?: QueryLazyOptions) => void, QueryResult]; export interface MutationHookOptions extends BaseMutationOptions { - mutation?: DocumentNode; + mutation?: DocumentNode | TypedDocumentNode; } export interface MutationOptions extends BaseMutationOptions { - mutation: DocumentNode; + mutation: DocumentNode | TypedDocumentNode; } export declare type MutationTuple = [(options?: MutationFunctionOptions) => Promise>, MutationResult]; export interface SubscriptionHookOptions extends BaseSubscriptionOptions { - subscription?: DocumentNode; + subscription?: DocumentNode | TypedDocumentNode; } export interface SubscriptionOptions extends BaseSubscriptionOptions { - subscription: DocumentNode; + subscription: DocumentNode | TypedDocumentNode; children?: null | ((result: SubscriptionResult) => JSX.Element | null); } export interface SubscriptionCurrentObservable { diff --git a/node_modules/@apollo/react-hooks/lib/useLazyQuery.d.ts b/node_modules/@apollo/react-hooks/lib/useLazyQuery.d.ts index 5339744..ac2b206 100644 --- a/node_modules/@apollo/react-hooks/lib/useLazyQuery.d.ts +++ b/node_modules/@apollo/react-hooks/lib/useLazyQuery.d.ts @@ -1,4 +1,6 @@ import { OperationVariables } from '@apollo/react-common'; import { DocumentNode } from 'graphql'; import { LazyQueryHookOptions, QueryTuple } from './types'; -export declare function useLazyQuery(query: DocumentNode, options?: LazyQueryHookOptions): QueryTuple; +import { TypedDocumentNode } from "@graphql-typed-document-node/core"; + +export declare function useLazyQuery(query: DocumentNode | TypedDocumentNode, options?: LazyQueryHookOptions): QueryTuple; diff --git a/node_modules/@apollo/react-hooks/lib/useMutation.d.ts b/node_modules/@apollo/react-hooks/lib/useMutation.d.ts index cbd07b1..c6e1a12 100644 --- a/node_modules/@apollo/react-hooks/lib/useMutation.d.ts +++ b/node_modules/@apollo/react-hooks/lib/useMutation.d.ts @@ -1,4 +1,5 @@ import { OperationVariables } from '@apollo/react-common'; import { DocumentNode } from 'graphql'; import { MutationHookOptions, MutationTuple } from './types'; -export declare function useMutation(mutation: DocumentNode, options?: MutationHookOptions): MutationTuple; +import { TypedDocumentNode } from "@graphql-typed-document-node/core"; +export declare function useMutation(mutation: DocumentNode | TypedDocumentNode, options?: MutationHookOptions): MutationTuple; diff --git a/node_modules/@apollo/react-hooks/lib/useQuery.d.ts b/node_modules/@apollo/react-hooks/lib/useQuery.d.ts index 942d080..13dd47f 100644 --- a/node_modules/@apollo/react-hooks/lib/useQuery.d.ts +++ b/node_modules/@apollo/react-hooks/lib/useQuery.d.ts @@ -1,4 +1,5 @@ import { OperationVariables, QueryResult } from '@apollo/react-common'; import { DocumentNode } from 'graphql'; import { QueryHookOptions } from './types'; -export declare function useQuery(query: DocumentNode, options?: QueryHookOptions): QueryResult; +import { TypedDocumentNode } from "@graphql-typed-document-node/core"; +export declare function useQuery(query: DocumentNode | TypedDocumentNode, options?: QueryHookOptions): QueryResult; diff --git a/node_modules/@apollo/react-hooks/lib/useSubscription.d.ts b/node_modules/@apollo/react-hooks/lib/useSubscription.d.ts index f803916..ad703ab 100644 --- a/node_modules/@apollo/react-hooks/lib/useSubscription.d.ts +++ b/node_modules/@apollo/react-hooks/lib/useSubscription.d.ts @@ -1,7 +1,8 @@ import { DocumentNode } from 'graphql'; import { OperationVariables } from '@apollo/react-common'; import { SubscriptionHookOptions } from './types'; -export declare function useSubscription(subscription: DocumentNode, options?: SubscriptionHookOptions): { +import { TypedDocumentNode } from "@graphql-typed-document-node/core"; +export declare function useSubscription(subscription: DocumentNode | TypedDocumentNode, options?: SubscriptionHookOptions): { variables: TVariables | undefined; loading: boolean; data?: TData | undefined;