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(
4040
4141type MaybePromise <T > = Promise <T > | T ;
4242
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+ }
4751```
4852
4953Implements the "Evaluating requests" section of the GraphQL specification.
Original file line number Diff line number Diff line change @@ -144,6 +144,15 @@ function graphql(
144144 variableValues ? : { [key : string ]: any },
145145 operationName ? : string ,
146146): 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+ }
147156```
148157
149158The ` 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({
234234 return null;
235235 },
236236});
237-
238- function oddValue(value) {
239- return value % 2 === 1 ? value : null;
240- }
241237```
242238
243239### GraphQLObjectType
You can’t perform that action at this time.
0 commit comments