Skip to content

Commit d3b7085

Browse files
committed
Fix kwarg name in example. Fixes #533
1 parent 8c7ca74 commit d3b7085

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/relay/nodes.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@ Example of a custom node:
5555
return '{}:{}'.format(type, id)
5656
5757
@staticmethod
58-
def get_node_from_global_id(info, global_id, only_node=None):
58+
def get_node_from_global_id(info, global_id, only_type=None):
5959
type, id = global_id.split(':')
60-
if only_node:
60+
if only_type:
6161
# We assure that the node type that we want to retrieve
6262
# is the same that was indicated in the field type
63-
assert type == only_node._meta.name, 'Received not compatible node.'
63+
assert type == only_type._meta.name, 'Received not compatible node.'
6464
6565
if type == 'User':
6666
return get_user(id)

0 commit comments

Comments
 (0)