Skip to content

Commit 1f5c0fe

Browse files
authored
Merge pull request #330 from wenley/wenley/nit-fix-documentation
Tweak the documentation to match behavior in the playground.
2 parents 88ccaec + 77e4ead commit 1f5c0fe

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docs/types/scalars.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Scalars
22
=======
33

4-
Graphene define the following base Scalar Types:
4+
Graphene defines the following base Scalar Types:
55

66
- ``graphene.String``
77
- ``graphene.Int``
@@ -47,8 +47,8 @@ The following is an example for creating a DateTime scalar:
4747
Mounting Scalars
4848
----------------
4949

50-
This scalars if are mounted in a ``ObjectType``, ``Interface`` or
51-
``Mutation``, would act as ``Field``\ s.
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.
5252

5353
.. code:: python
5454
@@ -57,14 +57,14 @@ This scalars if are mounted in a ``ObjectType``, ``Interface`` or
5757
5858
# Is equivalent to:
5959
class Person(graphene.ObjectType):
60-
name = graphene.Field(graphene.String())
60+
name = graphene.Field(graphene.String)
6161
6262
6363
If the types are mounted in a ``Field``, would act as ``Argument``\ s.
6464

6565
.. code:: python
6666
67-
graphene.Field(graphene.String(), to=graphene.String())
67+
graphene.Field(graphene.String, to=graphene.String())
6868
6969
# Is equivalent to:
70-
graphene.Field(graphene.String(), to=graphene.Argument(graphene.String()))
70+
graphene.Field(graphene.String, to=graphene.Argument(graphene.String()))

0 commit comments

Comments
 (0)