From c5b3acf5102fcf0a9b91f12df421270e980c1c3f Mon Sep 17 00:00:00 2001 From: Sebastian Siemssen Date: Thu, 16 Feb 2017 15:57:23 +0100 Subject: [PATCH] Do not swallow request attributes when using query batching. --- src/transport/batching.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/transport/batching.ts b/src/transport/batching.ts index a6bb18bd2de..dc602a97a21 100644 --- a/src/transport/batching.ts +++ b/src/transport/batching.ts @@ -59,13 +59,9 @@ export class QueryBatcher { return undefined; } - const requests: Request[] = this.queuedRequests.map((queuedRequest) => { - return { - query: queuedRequest.request.query, - variables: queuedRequest.request.variables, - operationName: queuedRequest.request.operationName, - }; - }); + const requests: Request[] = this.queuedRequests.map( + (queuedRequest) => queuedRequest.request, + ); const promises: (Promise | undefined)[] = []; const resolvers: any[] = [];