Update docs

This commit is contained in:
Jonathan Kim 2018-06-21 17:26:06 +01:00
parent e5a1d295d1
commit 4c17b78312

View File

@ -154,7 +154,7 @@ Interfaces you might come across this error:
This happens because Graphene doesn't have enough information to convert the This happens because Graphene doesn't have enough information to convert the
data object into a Graphene type needed to resolve the ``Interface``. To solve data object into a Graphene type needed to resolve the ``Interface``. To solve
this you can define a ``resolve_type`` class method on the ``Interface`` which this you can define a ``_resolve_type`` class method on the ``Interface`` which
maps a data object to a Graphene type: maps a data object to a Graphene type:
.. code:: python .. code:: python
@ -164,7 +164,7 @@ maps a data object to a Graphene type:
name = graphene.String(required=True) name = graphene.String(required=True)
@classmethod @classmethod
def resolve_type(cls, instance, info): def _resolve_type(cls, instance, info):
if instance.type == 'DROID': if instance.type == 'DROID':
return Droid return Droid
return Human return Human