mirror of
https://github.com/graphql-python/graphene.git
synced 2025-02-13 10:00:39 +03:00
Merge pull request #350 from nvie/doc-fixes
Various little documentation fixes
This commit is contained in:
commit
3f0c01ed3c
|
@ -24,8 +24,8 @@ The following is an example for creating a DateTime scalar:
|
||||||
.. code:: python
|
.. code:: python
|
||||||
|
|
||||||
import datetime
|
import datetime
|
||||||
from graphene.core.classtypes import Scalar
|
from graphene.types import Scalar
|
||||||
from graphql.core.language import ast
|
from graphql.language import ast
|
||||||
|
|
||||||
class DateTime(Scalar):
|
class DateTime(Scalar):
|
||||||
'''DateTime Scalar Description'''
|
'''DateTime Scalar Description'''
|
||||||
|
@ -47,8 +47,8 @@ The following is an example for creating a DateTime scalar:
|
||||||
Mounting Scalars
|
Mounting Scalars
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
These scalars, if are mounted in a ``ObjectType``, ``Interface`` or
|
If a scalar is mounted in an ``ObjectType``, ``Interface`` or
|
||||||
``Mutation``, act as ``Field``\ s. Note: when using the ``Field`` constructor directly, pass the type and not an instance.
|
``Mutation``, they act as ``Field``\ s:
|
||||||
|
|
||||||
.. code:: python
|
.. code:: python
|
||||||
|
|
||||||
|
@ -60,7 +60,11 @@ These scalars, if are mounted in a ``ObjectType``, ``Interface`` or
|
||||||
name = graphene.Field(graphene.String)
|
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
|
.. code:: python
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user