try fix test

This commit is contained in:
allen-munsch 2022-10-24 09:03:27 -05:00
parent bd9466c37d
commit bcd8a61da8
No known key found for this signature in database
GPG Key ID: 0C977048B8BDD447

View File

@ -453,7 +453,11 @@ class Schema:
return _type
def get_type(self, name):
return self.graphql_schema.type_map.get(name)
'''
This will actually return a `GraphQLObjectType` of type `GrapheneObjectType` from graphql-core, not a graphene ObjectType.
These two are fundamentally different classes. That's the reason why your test is failing. You'd need to return the Graphene type here.
'''
return self.graphql_schema.type_map.get(name).graphene_type
def lazy(self, _type):
return lambda: self.get_type(_type)