Skip to content

Commit 9311d35

Browse files
authored
Merge pull request #1324 from justinrmiller/doc-fixes
Various spelling and grammar fixes for the documentation.
2 parents a61f0a2 + 55cbc4d commit 9311d35

File tree

6 files changed

+16
-19
lines changed

6 files changed

+16
-19
lines changed

docs/execution/dataloader.rst

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,9 @@ Create loaders by providing a batch loading function.
2828
A batch loading function accepts a list of keys, and returns a ``Promise``
2929
which resolves to a list of ``values``.
3030

31-
Then load individual values from the loader. ``DataLoader`` will coalesce all
32-
individual loads which occur within a single frame of execution (executed once
33-
the wrapping promise is resolved) and then call your batch function with all
34-
requested keys.
31+
``DataLoader`` will coalesce all individual loads which occur within a
32+
single frame of execution (executed once the wrapping promise is resolved)
33+
and then call your batch function with all requested keys.
3534

3635

3736
.. code:: python
@@ -96,7 +95,7 @@ Consider the following GraphQL request:
9695
}
9796
9897
99-
Naively, if ``me``, ``bestFriend`` and ``friends`` each need to request the backend,
98+
If ``me``, ``bestFriend`` and ``friends`` each need to send a request to the backend,
10099
there could be at most 13 database requests!
101100

102101

docs/execution/middleware.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Functional example
4646
------------------
4747

4848
Middleware can also be defined as a function. Here we define a middleware that
49-
logs the time it takes to resolve each field
49+
logs the time it takes to resolve each field:
5050

5151
.. code:: python
5252

docs/types/interfaces.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Both of these types have all of the fields from the ``Character`` interface,
4444
but also bring in extra fields, ``home_planet``, ``starships`` and
4545
``primary_function``, that are specific to that particular type of character.
4646

47-
The full GraphQL schema defition will look like this:
47+
The full GraphQL schema definition will look like this:
4848

4949
.. code::
5050

docs/types/mutations.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ We should receive:
8585
8686
InputFields and InputObjectTypes
8787
----------------------------------
88-
InputFields are used in mutations to allow nested input data for mutations
88+
InputFields are used in mutations to allow nested input data for mutations.
8989

90-
To use an InputField you define an InputObjectType that specifies the structure of your input data
90+
To use an InputField you define an InputObjectType that specifies the structure of your input data:
9191

9292

9393
.. code:: python
@@ -112,7 +112,7 @@ To use an InputField you define an InputObjectType that specifies the structure
112112
return CreatePerson(person=person)
113113
114114
115-
Note that **name** and **age** are part of **person_data** now
115+
Note that **name** and **age** are part of **person_data** now.
116116

117117
Using the above mutation your new query would look like this:
118118

@@ -128,7 +128,7 @@ Using the above mutation your new query would look like this:
128128
}
129129
130130
InputObjectTypes can also be fields of InputObjectTypes allowing you to have
131-
as complex of input data as you need
131+
as complex of input data as you need:
132132

133133
.. code:: python
134134
@@ -160,7 +160,7 @@ To return an existing ObjectType instead of a mutation-specific type, set the **
160160
def mutate(root, info, name):
161161
return Person(name=name)
162162
163-
Then, if we query (``schema.execute(query_str)``) the following:
163+
Then, if we query (``schema.execute(query_str)``) with the following:
164164

165165
.. code::
166166

docs/types/schema.rst

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ There are some cases where the schema cannot access all of the types that we pla
4444
For example, when a field returns an ``Interface``, the schema doesn't know about any of the
4545
implementations.
4646

47-
In this case, we need to use the ``types`` argument when creating the Schema.
47+
In this case, we need to use the ``types`` argument when creating the Schema:
4848

4949

5050
.. code:: python
@@ -63,20 +63,18 @@ By default all field and argument names (that are not
6363
explicitly set with the ``name`` arg) will be converted from
6464
``snake_case`` to ``camelCase`` (as the API is usually being consumed by a js/mobile client)
6565

66-
For example with the ObjectType
66+
For example with the ObjectType the ``last_name`` field name is converted to ``lastName``:
6767

6868
.. code:: python
6969
7070
class Person(graphene.ObjectType):
7171
last_name = graphene.String()
7272
other_name = graphene.String(name='_other_Name')
7373
74-
the ``last_name`` field name is converted to ``lastName``.
75-
7674
In case you don't want to apply this transformation, provide a ``name`` argument to the field constructor.
7775
``other_name`` converts to ``_other_Name`` (without further transformations).
7876

79-
Your query should look like
77+
Your query should look like:
8078

8179
.. code::
8280
@@ -86,7 +84,7 @@ Your query should look like
8684
}
8785
8886
89-
To disable this behavior, set the ``auto_camelcase`` to ``False`` upon schema instantiation.
87+
To disable this behavior, set the ``auto_camelcase`` to ``False`` upon schema instantiation:
9088

9189
.. code:: python
9290

docs/types/unions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ to specify any common fields between the types.
77
The basics:
88

99
- Each Union is a Python class that inherits from ``graphene.Union``.
10-
- Unions don't have any fields on it, just links to the possible objecttypes.
10+
- Unions don't have any fields on it, just links to the possible ObjectTypes.
1111

1212
Quick example
1313
-------------

0 commit comments

Comments
 (0)