diff --git a/src/client.ts b/src/client.ts index 6c0e2b5bf2..d5ce4d6462 100755 --- a/src/client.ts +++ b/src/client.ts @@ -94,18 +94,6 @@ export class Client { }; }; - createRequestOperation = ( - type: OperationType, - { key, query, variables }: GraphQLRequest, - opts?: Partial - ): Operation => ({ - key, - query, - variables, - operationName: type, - context: this.createOperationContext(opts), - }); - /** Counts up the active operation key and dispatches the operation */ private onOperationStart(operation: Operation) { const { key } = operation; @@ -125,6 +113,18 @@ export class Client { } } + createRequestOperation = ( + type: OperationType, + { key, query, variables }: GraphQLRequest, + opts?: Partial + ): Operation => ({ + key, + query, + variables, + operationName: type, + context: this.createOperationContext(opts), + }); + /** Executes an Operation by sending it through the exchange pipeline It returns an observable that emits all related exchange results and keeps track of this observable's subscribers. A teardown signal will be emitted when no subscribers are listening anymore. */ executeRequestOperation(operation: Operation): Source { const { key, operationName } = operation; @@ -181,4 +181,8 @@ export class Client { const operation = this.createRequestOperation('mutation', query, opts); return this.executeRequestOperation(operation); }; + + setFetchOptions = (fetchOpts: Exclude) => { + this.fetchOptions = fetchOpts; + }; }