Skip to content

Commit 3f0c01e

Browse files
authored
Merge pull request #350 from nvie/doc-fixes
Various little documentation fixes
2 parents adfbffb + b2d7dfe commit 3f0c01e

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

docs/types/scalars.rst

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ The following is an example for creating a DateTime scalar:
2424
.. code:: python
2525
2626
import datetime
27-
from graphene.core.classtypes import Scalar
28-
from graphql.core.language import ast
27+
from graphene.types import Scalar
28+
from graphql.language import ast
2929
3030
class DateTime(Scalar):
3131
'''DateTime Scalar Description'''
@@ -47,8 +47,8 @@ The following is an example for creating a DateTime scalar:
4747
Mounting Scalars
4848
----------------
4949

50-
These scalars, if are mounted in a ``ObjectType``, ``Interface`` or
51-
``Mutation``, act as ``Field``\ s. Note: when using the ``Field`` constructor directly, pass the type and not an instance.
50+
If a scalar is mounted in an ``ObjectType``, ``Interface`` or
51+
``Mutation``, they act as ``Field``\ s:
5252

5353
.. code:: python
5454
@@ -60,7 +60,11 @@ These scalars, if are mounted in a ``ObjectType``, ``Interface`` or
6060
name = graphene.Field(graphene.String)
6161
6262
63-
If the types are mounted in a ``Field``, would act as ``Argument``\ s.
63+
**Note:** when using the ``Field`` constructor directly, pass the type and
64+
not an instance.
65+
66+
67+
If the types are mounted in a ``Field``, they act as ``Argument``\ s:
6468

6569
.. code:: python
6670

0 commit comments

Comments
 (0)