File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -111,11 +111,10 @@ export type ExecutionContext = {|
111
111
* - `errors` is included when any errors occurred as a non-empty array.
112
112
* - `data` is the result of a successful execution of the query.
113
113
*/
114
- export type ExecutionResult = {
114
+ export type ExecutionResult = { |
115
115
errors ?: $ReadOnlyArray < GraphQLError > ,
116
116
data ?: ObjMap < mixed > | null ,
117
- ...
118
- } ;
117
+ | } ;
119
118
120
119
export type ExecutionArgs = { |
121
120
schema : GraphQLSchema ,
@@ -181,7 +180,7 @@ export function execute(
181
180
} ) ;
182
181
}
183
182
184
- function executeImpl(args: ExecutionArgs): ExecutionResult {
183
+ function executeImpl(args: ExecutionArgs): PromiseOrValue < ExecutionResult > {
185
184
const {
186
185
schema,
187
186
document,
@@ -232,7 +231,7 @@ function executeImpl(args: ExecutionArgs): ExecutionResult {
232
231
function buildResponse (
233
232
exeContext : ExecutionContext ,
234
233
data : PromiseOrValue < ObjMap < mixed > | null> ,
235
- ) : ExecutionResult {
234
+ ) : PromiseOrValue < ExecutionResult > {
236
235
if ( isPromise ( data ) ) {
237
236
return data . then ( resolved => buildResponse ( exeContext , resolved ) ) ;
238
237
}
You can’t perform that action at this time.
0 commit comments