Improved docs

This commit is contained in:
Syrus Akbary 2016-09-25 05:01:12 -07:00
parent 6bd03d59d7
commit c9a30f7139
6 changed files with 7 additions and 7 deletions

View File

@ -14,7 +14,7 @@ Project setup
.. code:: bash .. code:: bash
pip install graphene --upgrade pip install "graphene>=1.0.dev"
Creating a basic Schema Creating a basic Schema
----------------------- -----------------------

View File

@ -32,7 +32,7 @@ plus the ones defined in ``UserFields``.
pass pass
.. code:: graphql .. code::
type User { type User {
name: String name: String

View File

@ -44,7 +44,7 @@ time.
The above types would have the following representation in a schema: The above types would have the following representation in a schema:
.. code:: graphql .. code::
interface Character { interface Character {
name: String name: String

View File

@ -53,7 +53,7 @@ Executing the Mutation
Then, if we query (``schema.execute(query_str)``) the following: Then, if we query (``schema.execute(query_str)``) the following:
.. code:: graphql .. code::
mutation myFirstMutation { mutation myFirstMutation {
createPerson(name:"Peter") { createPerson(name:"Peter") {

View File

@ -8,7 +8,7 @@ querying.
The basics: The basics:
- Each ObjectType is a Python class that inherits - Each ObjectType is a Python class that inherits
``graphene.ObjectType`` or inherits an implemented `Interface`_. ``graphene.ObjectType``.
- Each attribute of the ObjectType represents a ``Field``. - Each attribute of the ObjectType represents a ``Field``.
Quick example Quick example
@ -36,7 +36,7 @@ Field.
The above ``Person`` ObjectType would have the following representation The above ``Person`` ObjectType would have the following representation
in a schema: in a schema:
.. code:: graphql .. code::
type Person { type Person {
firstName: String firstName: String

View File

@ -62,7 +62,7 @@ would be converted to ``_other_Name`` (without any other transformation).
So, you would need to query with: So, you would need to query with:
.. code:: graphql .. code::
{ {
lastName lastName