From d3b708533d05ef13a6b15e7a3f29eac23f812a09 Mon Sep 17 00:00:00 2001 From: Jonathan Kim Date: Sat, 17 Feb 2018 23:28:33 +0000 Subject: [PATCH] Fix kwarg name in example. Fixes #533 --- docs/relay/nodes.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/relay/nodes.rst b/docs/relay/nodes.rst index f8601bdf..7af00ea1 100644 --- a/docs/relay/nodes.rst +++ b/docs/relay/nodes.rst @@ -55,12 +55,12 @@ Example of a custom node: return '{}:{}'.format(type, id) @staticmethod - def get_node_from_global_id(info, global_id, only_node=None): + def get_node_from_global_id(info, global_id, only_type=None): type, id = global_id.split(':') - if only_node: + if only_type: # We assure that the node type that we want to retrieve # is the same that was indicated in the field type - assert type == only_node._meta.name, 'Received not compatible node.' + assert type == only_type._meta.name, 'Received not compatible node.' if type == 'User': return get_user(id)