From 09fcb11f6e8cd0789169c020fcc12a1b5c3c47f8 Mon Sep 17 00:00:00 2001 From: Ivan Goncharov Date: Sat, 1 Jun 2019 23:29:55 +0300 Subject: [PATCH] Allow null value on 'data' property of 'ExecutionResult' type (#1938) --- src/execution/execute.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/execution/execute.js b/src/execution/execute.js index 6f57c1e2f5..e3e80e3724 100644 --- a/src/execution/execute.js +++ b/src/execution/execute.js @@ -113,7 +113,7 @@ export type ExecutionContext = {| */ export type ExecutionResult = { errors?: $ReadOnlyArray, - data?: ObjMap, + data?: ObjMap | null, }; export type ExecutionArgs = {| @@ -238,7 +238,7 @@ function executeImpl( function buildResponse( exeContext: ExecutionContext, data: PromiseOrValue | null>, -) { +): ExecutionResult { if (isPromise(data)) { return data.then(resolved => buildResponse(exeContext, resolved)); }