From 2b249a3ebf4f914d0bb7a272089f057a5781bd69 Mon Sep 17 00:00:00 2001 From: Ivan Goncharov Date: Sat, 1 Jun 2019 22:59:56 +0300 Subject: [PATCH] Allow null value on 'data' property of 'ExecutionResult' type --- 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)); }