def test_field_resolve_type_custom(): class MyCustomType(ObjectType): pass f = Field('MyCustomType') class OtherType(ObjectType): field_name = f s = Schema() s.query = OtherType s.register(MyCustomType) assert s.T(f).type == s.T(MyCustomType)