File tree Expand file tree Collapse file tree 3 files changed +17
-8
lines changed Expand file tree Collapse file tree 3 files changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -40,10 +40,14 @@ export function execute(
40
40
41
41
type MaybePromise <T > = Promise <T > | T ;
42
42
43
- type ExecutionResult = {
44
- data: Object ;
45
- errors? : GraphQLError [];
46
- };
43
+ interface ExecutionResult <
44
+ TData = ObjMap <unknown >,
45
+ TExtensions = ObjMap <unknown >,
46
+ > {
47
+ errors? : ReadonlyArray <GraphQLError >;
48
+ data? : TData | null ;
49
+ extensions? : TExtensions ;
50
+ }
47
51
```
48
52
49
53
Implements the "Evaluating requests" section of the GraphQL specification.
Original file line number Diff line number Diff line change @@ -144,6 +144,15 @@ function graphql(
144
144
variableValues ? : { [key : string ]: any },
145
145
operationName ? : string ,
146
146
): Promise <GraphQLResult >;
147
+
148
+ interface ExecutionResult <
149
+ TData = ObjMap <unknown >,
150
+ TExtensions = ObjMap <unknown >,
151
+ > {
152
+ errors? : ReadonlyArray <GraphQLError >;
153
+ data? : TData | null ;
154
+ extensions? : TExtensions ;
155
+ }
147
156
```
148
157
149
158
The ` graphql ` function lexes, parses, validates and executes a GraphQL request.
Original file line number Diff line number Diff line change @@ -234,10 +234,6 @@ const OddType = new GraphQLScalarType({
234
234
return null;
235
235
},
236
236
});
237
-
238
- function oddValue(value) {
239
- return value % 2 === 1 ? value : null;
240
- }
241
237
```
242
238
243
239
### GraphQLObjectType
You can’t perform that action at this time.
0 commit comments