@@ -94,15 +94,15 @@ import { Maybe } from '../jsutils/Maybe';
94
94
* and the fragments defined in the query document
95
95
*/
96
96
export type ExecutionContext = {
97
- schema : GraphQLSchema ,
98
- fragments : ObjMap < FragmentDefinitionNode > ,
99
- rootValue : unknown ,
100
- contextValue : unknown ,
101
- operation : OperationDefinitionNode ,
102
- variableValues : { [ variable : string ] : unknown } ,
103
- fieldResolver : GraphQLFieldResolver < any , any > ,
104
- typeResolver : GraphQLTypeResolver < any , any > ,
105
- errors : Array < GraphQLError > ,
97
+ schema : GraphQLSchema ;
98
+ fragments : ObjMap < FragmentDefinitionNode > ;
99
+ rootValue : unknown ;
100
+ contextValue : unknown ;
101
+ operation : OperationDefinitionNode ;
102
+ variableValues : { [ variable : string ] : unknown } ;
103
+ fieldResolver : GraphQLFieldResolver < any , any > ;
104
+ typeResolver : GraphQLTypeResolver < any , any > ;
105
+ errors : Array < GraphQLError > ;
106
106
} ;
107
107
108
108
/**
@@ -113,26 +113,26 @@ export type ExecutionContext = {
113
113
* - `extensions` is reserved for adding non-standard properties.
114
114
*/
115
115
export type ExecutionResult = {
116
- errors ?: ReadonlyArray < GraphQLError > ,
117
- data ?: ObjMap < unknown > | null ,
118
- extensions ?: ObjMap < unknown > ,
116
+ errors ?: ReadonlyArray < GraphQLError > ;
117
+ data ?: ObjMap < unknown > | null ;
118
+ extensions ?: ObjMap < unknown > ;
119
119
} ;
120
120
121
121
export type FormattedExecutionResult = {
122
- errors ?: ReadonlyArray < GraphQLFormattedError > ,
123
- data ?: ObjMap < unknown > | null ,
124
- extensions ?: ObjMap < unknown > ,
122
+ errors ?: ReadonlyArray < GraphQLFormattedError > ;
123
+ data ?: ObjMap < unknown > | null ;
124
+ extensions ?: ObjMap < unknown > ;
125
125
} ;
126
126
127
127
export type ExecutionArgs = {
128
- schema : GraphQLSchema ,
129
- document : DocumentNode ,
130
- rootValue ?: unknown ,
131
- contextValue ?: unknown ,
132
- variableValues ?: Maybe < { readonly [ variable : string ] : unknown } > ,
133
- operationName ?: Maybe < string > ,
134
- fieldResolver ?: Maybe < GraphQLFieldResolver < any , any > > ,
135
- typeResolver ?: Maybe < GraphQLTypeResolver < any , any > > ,
128
+ schema : GraphQLSchema ;
129
+ document : DocumentNode ;
130
+ rootValue ?: unknown ;
131
+ contextValue ?: unknown ;
132
+ variableValues ?: Maybe < { readonly [ variable : string ] : unknown } > ;
133
+ operationName ?: Maybe < string > ;
134
+ fieldResolver ?: Maybe < GraphQLFieldResolver < any , any > > ;
135
+ typeResolver ?: Maybe < GraphQLTypeResolver < any , any > > ;
136
136
} ;
137
137
138
138
/**
@@ -887,7 +887,10 @@ function completeListValue(
887
887
* Complete a Scalar or Enum by serializing to a valid value, returning
888
888
* null if serialization is not possible.
889
889
*/
890
- function completeLeafValue ( returnType : GraphQLLeafType , result : unknown ) : unknown {
890
+ function completeLeafValue (
891
+ returnType : GraphQLLeafType ,
892
+ result : unknown ,
893
+ ) : unknown {
891
894
const serializedResult = returnType . serialize ( result ) ;
892
895
if ( serializedResult === undefined ) {
893
896
throw new Error (
@@ -1112,12 +1115,10 @@ function _collectSubfields(
1112
1115
* Otherwise, test each possible type for the abstract type by calling
1113
1116
* isTypeOf for the object being coerced, returning the first type that matches.
1114
1117
*/
1115
- export const defaultTypeResolver : GraphQLTypeResolver < unknown , unknown > = function (
1116
- value ,
1117
- contextValue ,
1118
- info ,
1119
- abstractType ,
1120
- ) {
1118
+ export const defaultTypeResolver : GraphQLTypeResolver <
1119
+ unknown ,
1120
+ unknown
1121
+ > = function ( value , contextValue , info , abstractType ) {
1121
1122
// First, look for `__typename`.
1122
1123
if ( isObjectLike ( value ) && typeof value . __typename === 'string' ) {
1123
1124
return value . __typename ;
@@ -1160,7 +1161,7 @@ export const defaultTypeResolver: GraphQLTypeResolver<unknown, unknown> = functi
1160
1161
*/
1161
1162
export const defaultFieldResolver : GraphQLFieldResolver <
1162
1163
unknown ,
1163
- unknown ,
1164
+ unknown
1164
1165
> = function ( source : any , args , contextValue , info ) {
1165
1166
// ensure source is a value for which property access is acceptable.
1166
1167
if ( isObjectLike ( source ) || typeof source === 'function' ) {
0 commit comments