Skip to content

Commit

Permalink
Merge pull request #350 from nvie/doc-fixes
Browse files Browse the repository at this point in the history
Various little documentation fixes
  • Loading branch information
syrusakbary authored Nov 4, 2016
2 parents adfbffb + b2d7dfe commit 3f0c01e
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions docs/types/scalars.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ The following is an example for creating a DateTime scalar:
.. code:: python
import datetime
from graphene.core.classtypes import Scalar
from graphql.core.language import ast
from graphene.types import Scalar
from graphql.language import ast
class DateTime(Scalar):
'''DateTime Scalar Description'''
Expand All @@ -47,8 +47,8 @@ The following is an example for creating a DateTime scalar:
Mounting Scalars
----------------

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.
If a scalar is mounted in an ``ObjectType``, ``Interface`` or
``Mutation``, they act as ``Field``\ s:

.. code:: python
Expand All @@ -60,7 +60,11 @@ These scalars, if are mounted in a ``ObjectType``, ``Interface`` or
name = graphene.Field(graphene.String)
If the types are mounted in a ``Field``, would act as ``Argument``\ s.
**Note:** when using the ``Field`` constructor directly, pass the type and
not an instance.


If the types are mounted in a ``Field``, they act as ``Argument``\ s:

.. code:: python
Expand Down

0 comments on commit 3f0c01e

Please sign in to comment.