@@ -53,11 +53,6 @@ def schema_with_object_with_field_resolver(
53
53
)
54
54
55
55
56
- ObjectWithIsTypeOf = GraphQLObjectType (
57
- "ObjectWithIsTypeOf" , {"f" : GraphQLField (GraphQLString )}
58
- )
59
-
60
-
61
56
def describe_type_system_scalars ():
62
57
def accepts_a_scalar_type_defining_serialize ():
63
58
schema_with_field_type (GraphQLScalarType ("SomeScalar" , lambda : None ))
@@ -266,11 +261,6 @@ def interfaces():
266
261
def accepts_a_lambda_as_an_object_field_resolver ():
267
262
schema_with_object_with_field_resolver (lambda _obj , _info : {})
268
263
269
- def accepts_an_object_type_with_an_is_type_of_function ():
270
- schema_with_field_type (
271
- GraphQLObjectType ("AnotherObject" , {"f" : GraphQLField (GraphQLString )})
272
- )
273
-
274
264
def rejects_an_object_type_field_with_undefined_config ():
275
265
undefined_field = cast (GraphQLField , None )
276
266
obj_type = GraphQLObjectType ("SomeObject" , {"f" : undefined_field })
@@ -394,30 +384,6 @@ def accepts_an_interface_type_defining_resolve_type():
394
384
schema .query_type .fields ["field" ].type .interfaces [0 ] is AnotherInterfaceType
395
385
)
396
386
397
- def accepts_an_interface_with_implementing_type_defining_is_type_of ():
398
- InterfaceTypeWithoutResolveType = GraphQLInterfaceType (
399
- "InterfaceTypeWithoutResolveType" , {"f" : GraphQLField (GraphQLString )}
400
- )
401
-
402
- assert schema_with_field_type (
403
- GraphQLObjectType (
404
- "SomeObject" ,
405
- {"f" : GraphQLField (GraphQLString )},
406
- [InterfaceTypeWithoutResolveType ],
407
- )
408
- )
409
-
410
- def accepts_interface_type_with_resolve_type_and_is_type_of_in_implementation ():
411
- AnotherInterfaceType = GraphQLInterfaceType (
412
- "AnotherInterfaceType" , {"f" : GraphQLField (GraphQLString )}
413
- )
414
-
415
- assert schema_with_field_type (
416
- GraphQLObjectType (
417
- "SomeObject" , {"f" : GraphQLField (GraphQLString )}, [AnotherInterfaceType ]
418
- )
419
- )
420
-
421
387
def rejects_an_interface_type_with_an_incorrect_type_for_resolve_type ():
422
388
with raises (TypeError ) as exc_info :
423
389
# noinspection PyTypeChecker
@@ -442,11 +408,6 @@ def allows_a_thunk_for_union_member_types():
442
408
def accepts_a_union_type_defining_resolve_type ():
443
409
assert schema_with_field_type (GraphQLUnionType ("SomeUnion" , [ObjectType ]))
444
410
445
- def accepts_a_union_of_object_types_defining_is_type_of ():
446
- assert schema_with_field_type (
447
- GraphQLUnionType ("SomeUnion" , [ObjectWithIsTypeOf ])
448
- )
449
-
450
411
def accepts_a_union_type_with_list_types ():
451
412
assert schema_with_field_type (GraphQLUnionType ("SomeUnion" , [ObjectType ]))
452
413
@@ -463,9 +424,7 @@ def accepts_a_union_type_without_types():
463
424
def rejects_an_interface_type_with_an_incorrect_type_for_resolve_type ():
464
425
with raises (TypeError ) as exc_info :
465
426
# noinspection PyTypeChecker
466
- schema_with_field_type (
467
- GraphQLUnionType ("SomeUnion" , [ObjectWithIsTypeOf ], resolve_type = {})
468
- )
427
+ schema_with_field_type (GraphQLUnionType ("SomeUnion" , [], resolve_type = {}))
469
428
msg = str (exc_info .value )
470
429
assert msg == (
471
430
"SomeUnion must provide 'resolve_type' as a function, but got: {}."
0 commit comments