Merge branch 'master' into update-object-type-docs-resolver

This commit is contained in:
Eran Kampf 2019-03-17 12:26:13 -07:00 committed by GitHub
commit 38db79c257
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -194,4 +194,17 @@ previous example you could do:
peter.first_name # prints "Peter" peter.first_name # prints "Peter"
peter.last_name # prints "Griffin" peter.last_name # prints "Griffin"
Changing the name
-----------------
By default the type name in the GraphQL schema will the same as the class name
that defines the ``ObjectType``. This can be changed by setting the ``name``
property on the ``Meta`` class:
.. code:: python
class MyGraphQlSong(graphene.ObjectType):
class Meta:
name = 'Song'
.. _Interface: /docs/interfaces/ .. _Interface: /docs/interfaces/