diff --git a/src/core/QueryManager.ts b/src/core/QueryManager.ts index bf9c6613d4d..12db6daa4df 100644 --- a/src/core/QueryManager.ts +++ b/src/core/QueryManager.ts @@ -25,6 +25,7 @@ import { makeUniqueId, isDocumentNode, isNonNullObject, + cloneDeep, } from '../utilities'; import { ApolloError, isApolloError } from '../errors'; import { @@ -1034,6 +1035,10 @@ export class QueryManager { ): Observable> { const requestId = queryInfo.lastRequestId = this.generateRequestId(); + // Make sure we write the result below using the same options we were given, + // even though the input object may have been modified in the meantime. + options = cloneDeep(options); + return asyncMap( this.getObservableFromLink( queryInfo.document!,