File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 1
1
Scalars
2
2
=======
3
3
4
- Graphene define the following base Scalar Types:
4
+ Graphene defines the following base Scalar Types:
5
5
6
6
- ``graphene.String ``
7
7
- ``graphene.Int ``
@@ -47,8 +47,8 @@ The following is an example for creating a DateTime scalar:
47
47
Mounting Scalars
48
48
----------------
49
49
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 .
52
52
53
53
.. code :: python
54
54
@@ -57,14 +57,14 @@ This scalars if are mounted in a ``ObjectType``, ``Interface`` or
57
57
58
58
# Is equivalent to:
59
59
class Person (graphene .ObjectType ):
60
- name = graphene.Field(graphene.String() )
60
+ name = graphene.Field(graphene.String)
61
61
62
62
63
63
If the types are mounted in a ``Field ``, would act as ``Argument ``\ s.
64
64
65
65
.. code :: python
66
66
67
- graphene.Field(graphene.String() , to = graphene.String())
67
+ graphene.Field(graphene.String, to = graphene.String())
68
68
69
69
# Is equivalent to:
70
- graphene.Field(graphene.String() , to = graphene.Argument(graphene.String()))
70
+ graphene.Field(graphene.String, to = graphene.Argument(graphene.String()))
You can’t perform that action at this time.
0 commit comments