Skip to content

Commit

Permalink
Allow null value on 'data' property of 'ExecutionResult' type (#1938)
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanGoncharov committed Jun 1, 2019
1 parent 8d403ca commit 09fcb11
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/execution/execute.js
Expand Up @@ -113,7 +113,7 @@ export type ExecutionContext = {|
*/
export type ExecutionResult = {
errors?: $ReadOnlyArray<GraphQLError>,
data?: ObjMap<mixed>,
data?: ObjMap<mixed> | null,
};

export type ExecutionArgs = {|
Expand Down Expand Up @@ -238,7 +238,7 @@ function executeImpl(
function buildResponse(
exeContext: ExecutionContext,
data: PromiseOrValue<ObjMap<mixed> | null>,
) {
): ExecutionResult {
if (isPromise(data)) {
return data.then(resolved => buildResponse(exeContext, resolved));
}
Expand Down

0 comments on commit 09fcb11

Please sign in to comment.