@@ -758,7 +758,7 @@ function defineFieldMap<TSource, TContext>(
758
758
| GraphQLInterfaceTypeConfig < TSource , TContext > ,
759
759
> ,
760
760
) : GraphQLFieldMap < TSource , TContext > {
761
- const fieldMap = resolveThunk ( config . fields ) || { } ;
761
+ const fieldMap = resolveThunk ( config . fields ) ;
762
762
devAssert (
763
763
isPlainObj ( fieldMap ) ,
764
764
`${ config . name } fields must be an object with field names as keys or a function which returns such an object.` ,
@@ -1147,7 +1147,7 @@ defineToJSON(GraphQLUnionType);
1147
1147
function defineTypes (
1148
1148
config : $ReadOnly < GraphQLUnionTypeConfig < mixed , mixed >> ,
1149
1149
) : Array < GraphQLObjectType > {
1150
- const types = resolveThunk ( config . types ) || [ ] ;
1150
+ const types = resolveThunk ( config . types ) ;
1151
1151
devAssert (
1152
1152
Array . isArray ( types ) ,
1153
1153
`Must provide Array of types or a function which returns such an array for Union ${ config . name } .` ,
@@ -1430,7 +1430,7 @@ defineToJSON(GraphQLInputObjectType);
1430
1430
function defineInputFieldMap (
1431
1431
config : $ReadOnly < GraphQLInputObjectTypeConfig > ,
1432
1432
) : GraphQLInputFieldMap {
1433
- const fieldMap = resolveThunk ( config . fields ) || { } ;
1433
+ const fieldMap = resolveThunk ( config . fields ) ;
1434
1434
devAssert (
1435
1435
isPlainObj ( fieldMap ) ,
1436
1436
`${ config . name } fields must be an object with field names as keys or a function which returns such an object.` ,
0 commit comments