File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -56,3 +56,25 @@ a GraphQLError will be thrown immediately explaining the invalid input.
5656` ExecutionResult ` represents the result of execution. ` data ` is the result of
5757executing the query, ` errors ` is null if no errors occurred, and is a
5858non-empty array if an error occurred.
59+
60+ ### executeSync
61+
62+ ``` ts
63+ export function executeSync(
64+ schema : GraphQLSchema ,
65+ documentAST : Document ,
66+ rootValue ? : mixed ,
67+ contextValue ? : mixed ,
68+ variableValues ? : { [key : string ]: mixed },
69+ operationName ? : string ,
70+ ): ExecutionResult ;
71+
72+ type ExecutionResult = {
73+ data: Object ;
74+ errors? : GraphQLError [];
75+ };
76+ ```
77+
78+ This is a short-hand method that will call ` execute ` and when the response can
79+ be returned synchronously it will be returned, when a ` Promise ` is returned this
80+ method will throw an error.
You can’t perform that action at this time.
0 commit comments