We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8c7ca74 commit d3b7085Copy full SHA for d3b7085
docs/relay/nodes.rst
@@ -55,12 +55,12 @@ Example of a custom node:
55
return '{}:{}'.format(type, id)
56
57
@staticmethod
58
- def get_node_from_global_id(info, global_id, only_node=None):
+ def get_node_from_global_id(info, global_id, only_type=None):
59
type, id = global_id.split(':')
60
- if only_node:
+ if only_type:
61
# We assure that the node type that we want to retrieve
62
# is the same that was indicated in the field type
63
- assert type == only_node._meta.name, 'Received not compatible node.'
+ assert type == only_type._meta.name, 'Received not compatible node.'
64
65
if type == 'User':
66
return get_user(id)
0 commit comments