diff --git a/node_modules/apollo-angular/apollo.d.ts b/node_modules/apollo-angular/apollo.d.ts index 6fa221b..bb1a410 100644 --- a/node_modules/apollo-angular/apollo.d.ts +++ b/node_modules/apollo-angular/apollo.d.ts @@ -8,10 +8,10 @@ export declare class ApolloBase { protected ngZone: NgZone; protected _client?: ApolloClient; constructor(ngZone: NgZone, _client?: ApolloClient); - watchQuery(options: WatchQueryOptions): QueryRef; - query(options: QueryOptions): Observable>; + watchQuery(options: WatchQueryOptions): QueryRef; + query(options: QueryOptions): Observable>; mutate(options: MutationOptions): Observable>; - subscribe(options: SubscriptionOptions, extra?: ExtraSubscriptionOptions): Observable>; + subscribe(options: SubscriptionOptions, extra?: ExtraSubscriptionOptions): Observable>; /** * Get an access to an instance of ApolloClient */ diff --git a/node_modules/apollo-angular/mutation.d.ts b/node_modules/apollo-angular/mutation.d.ts index 8342f8d..1b2ef12 100644 --- a/node_modules/apollo-angular/mutation.d.ts +++ b/node_modules/apollo-angular/mutation.d.ts @@ -1,3 +1,4 @@ +import { TypedDocumentNode } from "@graphql-typed-document-node/core"; import { DocumentNode } from 'graphql'; import { Observable } from 'rxjs'; import { FetchResult } from 'apollo-link'; @@ -5,7 +6,7 @@ import { Apollo } from './apollo'; import { MutationOptionsAlone, R } from './types'; export declare class Mutation { protected apollo: Apollo; - readonly document: DocumentNode; + readonly document: DocumentNode | TypedDocumentNode; client: string; constructor(apollo: Apollo); mutate(variables?: V, options?: MutationOptionsAlone): Observable>; diff --git a/node_modules/apollo-angular/query-ref.d.ts b/node_modules/apollo-angular/query-ref.d.ts index 68dfd69..64ed744 100644 --- a/node_modules/apollo-angular/query-ref.d.ts +++ b/node_modules/apollo-angular/query-ref.d.ts @@ -8,7 +8,7 @@ export declare class QueryRef { options: ObservableQuery['options']; queryId: ObservableQuery['queryId']; variables: V; - constructor(obsQuery: ObservableQuery, ngZone: NgZone, options: WatchQueryOptions); + constructor(obsQuery: ObservableQuery, ngZone: NgZone, options: WatchQueryOptions); result(): Promise>; currentResult(): ApolloCurrentResult; getLastResult(): ApolloQueryResult; diff --git a/node_modules/apollo-angular/query.d.ts b/node_modules/apollo-angular/query.d.ts index c2464ca..dba7b68 100644 --- a/node_modules/apollo-angular/query.d.ts +++ b/node_modules/apollo-angular/query.d.ts @@ -1,3 +1,4 @@ +import { TypedDocumentNode } from "@graphql-typed-document-node/core"; import { DocumentNode } from 'graphql'; import { ApolloQueryResult } from 'apollo-client'; import { Observable } from 'rxjs'; @@ -6,9 +7,9 @@ import { QueryRef } from './query-ref'; import { WatchQueryOptionsAlone, QueryOptionsAlone, R } from './types'; export declare class Query { protected apollo: Apollo; - readonly document: DocumentNode; + readonly document: DocumentNode | TypedDocumentNode; client: string; constructor(apollo: Apollo); - watch(variables?: V, options?: WatchQueryOptionsAlone): QueryRef; - fetch(variables?: V, options?: QueryOptionsAlone): Observable>; + watch(variables?: V, options?: WatchQueryOptionsAlone): QueryRef; + fetch(variables?: V, options?: QueryOptionsAlone): Observable>; } diff --git a/node_modules/apollo-angular/subscription.d.ts b/node_modules/apollo-angular/subscription.d.ts index 8db72d2..d2c7c9a 100644 --- a/node_modules/apollo-angular/subscription.d.ts +++ b/node_modules/apollo-angular/subscription.d.ts @@ -1,11 +1,12 @@ +import { TypedDocumentNode } from "@graphql-typed-document-node/core"; import { DocumentNode } from 'graphql'; import { Observable } from 'rxjs'; import { Apollo } from './apollo'; import { SubscriptionOptionsAlone, ExtraSubscriptionOptions, SubscriptionResult, R } from './types'; export declare class Subscription { protected apollo: Apollo; - readonly document: DocumentNode; + readonly document: DocumentNode | TypedDocumentNode; client: string; constructor(apollo: Apollo); - subscribe(variables?: V, options?: SubscriptionOptionsAlone, extra?: ExtraSubscriptionOptions): Observable>; + subscribe(variables?: V, options?: SubscriptionOptionsAlone, extra?: ExtraSubscriptionOptions): Observable>; } diff --git a/node_modules/apollo-angular/types.d.ts b/node_modules/apollo-angular/types.d.ts index 76b32de..7062771 100644 --- a/node_modules/apollo-angular/types.d.ts +++ b/node_modules/apollo-angular/types.d.ts @@ -1,3 +1,5 @@ +import { TypedDocumentNode } from "@graphql-typed-document-node/core"; +import { DocumentNode } from 'graphql'; import { WatchQueryOptions as CoreWatchQueryOptions, QueryOptions as CoreQueryOptions, MutationOptions as CoreMutationOptions, SubscriptionOptions as CoreSubscriptionOptions, ApolloClientOptions } from 'apollo-client'; import { ExecutionResult } from 'graphql'; export declare type R = { @@ -7,15 +9,15 @@ export interface ExtraSubscriptionOptions { useZone?: boolean; } export declare type Omit = Pick>; -export interface WatchQueryOptionsAlone extends Omit, 'query' | 'variables'> { +export interface WatchQueryOptionsAlone extends Omit, 'query' | 'variables'> { } -export interface QueryOptionsAlone extends Omit, 'query' | 'variables'> { +export interface QueryOptionsAlone extends Omit, 'query' | 'variables'> { } export interface MutationOptionsAlone extends Omit, 'mutation' | 'variables'> { } -export interface SubscriptionOptionsAlone extends Omit, 'query' | 'variables'> { +export interface SubscriptionOptionsAlone extends Omit, 'query' | 'variables'> { } -export interface WatchQueryOptions extends CoreWatchQueryOptions { +export interface WatchQueryOptions extends Omit, 'query'> { /** * Observable starts with `{ loading: true }`. * There's a big chance the next major version will enable that by default. @@ -23,6 +25,8 @@ export interface WatchQueryOptions extends CoreWatchQueryOptions { * Disabled by default */ useInitialLoading?: boolean; + + query: DocumentNode | TypedDocumentNode; } export interface SubscriptionResult extends ExecutionResult { data?: T;