@@ -440,24 +440,6 @@ func defineInterfaces(
440
440
hasTypeOf: Bool ,
441
441
interfaces: [ GraphQLInterfaceType ]
442
442
) throws -> [ GraphQLInterfaceType ] {
443
- guard !interfaces. isEmpty else {
444
- return [ ]
445
- }
446
-
447
- if !hasTypeOf {
448
- for interface in interfaces {
449
- guard interface. resolveType != nil else {
450
- throw GraphQLError (
451
- message:
452
- " Interface Type \( interface. name) does not provide a \" resolveType \" " +
453
- " function and implementing Type \( name) does not provide a " +
454
- " \" isTypeOf \" function. There is no way to resolve this implementing " +
455
- " type during execution. "
456
- )
457
- }
458
- }
459
- }
460
-
461
443
return interfaces
462
444
}
463
445
@@ -1200,12 +1182,6 @@ func defineEnumValues(
1200
1182
name: String ,
1201
1183
valueMap: GraphQLEnumValueMap
1202
1184
) throws -> [ GraphQLEnumValueDefinition ] {
1203
- guard !valueMap. isEmpty else {
1204
- throw GraphQLError (
1205
- message: " \( name) values must be an object with value names as keys. "
1206
- )
1207
- }
1208
-
1209
1185
var definitions : [ GraphQLEnumValueDefinition ] = [ ]
1210
1186
1211
1187
for (valueName, value) in valueMap {
@@ -1405,14 +1381,6 @@ func defineInputObjectFieldMap(
1405
1381
name: String ,
1406
1382
fields: InputObjectFieldMap
1407
1383
) throws -> InputObjectFieldDefinitionMap {
1408
- guard !fields. isEmpty else {
1409
- throw GraphQLError (
1410
- message:
1411
- " \( name) fields must be an object with field names as " +
1412
- " keys or a function which returns such an object. "
1413
- )
1414
- }
1415
-
1416
1384
var definitionMap = InputObjectFieldDefinitionMap ( )
1417
1385
1418
1386
for (name, field) in fields {
0 commit comments