From 313a0041414c729fba8c2270359628b1251ce960 Mon Sep 17 00:00:00 2001 From: Ryan Wilson-Perkin Date: Wed, 1 Mar 2017 09:30:39 -0500 Subject: [PATCH] Spelling/Grammar fixes in docs Hi, thanks for writing these docs! I'm reading through them and hoping to give back by fixing up some spelling and grammatical issues. --- docs/relay/nodes.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/relay/nodes.rst b/docs/relay/nodes.rst index 59c818da..4b2c96aa 100644 --- a/docs/relay/nodes.rst +++ b/docs/relay/nodes.rst @@ -3,7 +3,7 @@ Nodes A ``Node`` is an Interface provided by ``graphene.relay`` that contains a single field ``id`` (which is a ``ID!``). Any object that inherits -from it have to implement a ``get_node`` method for retrieving a +from it has to implement a ``get_node`` method for retrieving a ``Node`` by an *id*. @@ -26,8 +26,8 @@ Example usage (taken from the `Starwars Relay example`_): return get_ship(id) The ``id`` returned by the ``Ship`` type when you query it will be a -scalar which contains the enough info for the server for knowing it’s -type and it’s id. +scalar which contains enough info for the server to know its type and +its id. For example, the instance ``Ship(id=1)`` will return ``U2hpcDox`` as the id when you query it (which is the base64 encoding of ``Ship:1``), and @@ -77,7 +77,7 @@ Accessing node types If we want to retrieve node instances from a ``global_id`` (scalar that identifies an instance by it's type name and id), we can simply do ``Node.get_node_from_global_id(global_id, context, info)``. -In the case we want to restrict the instnance retrieval to an specific type, we can do: +In the case we want to restrict the instance retrieval to a specific type, we can do: ``Node.get_node_from_global_id(global_id, context, info, only_type=Ship)``. This will raise an error if the ``global_id`` doesn't correspond to a Ship type.