From cdaa30bb6d2d7d15e835cf47fddeda0bffee6ae7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Brabec?= Date: Tue, 19 Dec 2017 19:39:31 +0100 Subject: [PATCH] Fix docs on return type of `execute` API Reference incorrectly states that return type of `execute` is always a `Promise` --- site/graphql-js/APIReference-Execution.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/site/graphql-js/APIReference-Execution.md b/site/graphql-js/APIReference-Execution.md index 41b7e7e0fa..750c2889f8 100644 --- a/site/graphql-js/APIReference-Execution.md +++ b/site/graphql-js/APIReference-Execution.md @@ -38,7 +38,9 @@ export function execute( contextValue?: mixed, variableValues?: ?{[key: string]: mixed}, operationName?: ?string -): Promise +): MaybePromise + +type MaybePromise = Promise | T; type ExecutionResult = { data: ?Object;