AttributeError: Type "get_type" not found in the Schema

```
    relay.Node.get_node_from_global_id(info, g_id) for g_id in global_id
  File "/home/jm/pycharm_projects/propertymeld/venv_3_10_7/lib/python3.10/site-packages/graphene/relay/node.py", line 98, in get_node_from_global_id
    graphene_type = info.schema.get_type(_type)
  File "/home/jm/pycharm_projects/propertymeld/venv_3_10_7/lib/python3.10/site-packages/graphene/types/schema.py", line 451, in __getattr__
    if isinstance(_type, GrapheneGraphQLType):
AttributeError: Type "get_type" not found in the Schema
```

graphene==3.1.1
python 3.10.7
This commit is contained in:
James 2022-10-18 17:17:06 -05:00 committed by GitHub
parent ee1ff975d7
commit 3faf60e458
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -452,6 +452,9 @@ class Schema:
return _type.graphene_type return _type.graphene_type
return _type return _type
def get_type(self, name):
return self.graphql_schema.type_map.get(name)
def lazy(self, _type): def lazy(self, _type):
return lambda: self.get_type(_type) return lambda: self.get_type(_type)