Skip to content

Commit

Permalink
Tweak the documentation to match behavior in the playground.
Browse files Browse the repository at this point in the history
  • Loading branch information
wenley committed Oct 16, 2016
1 parent 88ccaec commit 77e4ead
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/types/scalars.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Scalars
=======

Graphene define the following base Scalar Types:
Graphene defines the following base Scalar Types:

- ``graphene.String``
- ``graphene.Int``
Expand Down Expand Up @@ -47,8 +47,8 @@ The following is an example for creating a DateTime scalar:
Mounting Scalars
----------------

This scalars if are mounted in a ``ObjectType``, ``Interface`` or
``Mutation``, would act as ``Field``\ s.
These scalars, if are mounted in a ``ObjectType``, ``Interface`` or
``Mutation``, act as ``Field``\ s. Note: when using the ``Field`` constructor directly, pass the type and not an instance.

.. code:: python
Expand All @@ -57,14 +57,14 @@ This scalars if are mounted in a ``ObjectType``, ``Interface`` or
# Is equivalent to:
class Person(graphene.ObjectType):
name = graphene.Field(graphene.String())
name = graphene.Field(graphene.String)
If the types are mounted in a ``Field``, would act as ``Argument``\ s.

.. code:: python
graphene.Field(graphene.String(), to=graphene.String())
graphene.Field(graphene.String, to=graphene.String())
# Is equivalent to:
graphene.Field(graphene.String(), to=graphene.Argument(graphene.String()))
graphene.Field(graphene.String, to=graphene.Argument(graphene.String()))

0 comments on commit 77e4ead

Please sign in to comment.