Skip to content

Commit 1f50f43

Browse files
committed
Docs: some language cleanup
Replicates graphql/graphql-js@11505d7
1 parent 40f3aeb commit 1f50f43

File tree

4 files changed

+12
-13
lines changed

4 files changed

+12
-13
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ examples.
3434

3535
## Getting started
3636

37-
An overview of GraphQL in general is available in the
37+
A general overview of GraphQL is available in the
3838
[README](https://github.com/graphql/graphql-spec/blob/main/README.md) for the
3939
[Specification for GraphQL](https://github.com/graphql/graphql-spec). That overview
4040
describes a simple set of GraphQL examples that exist as [tests](tests) in this
@@ -46,20 +46,20 @@ README and the corresponding tests in parallel.
4646

4747
GraphQL-core 3 can be installed from PyPI using the built-in pip command:
4848

49-
python -m pip install "graphql-core>=3"
49+
python -m pip install graphql-core
5050

51-
Alternatively, you can also use [pipenv](https://docs.pipenv.org/) for installation in a
51+
You can also use [pipenv](https://docs.pipenv.org/) for installation in a
5252
virtual environment:
5353

54-
pipenv install "graphql-core>=3"
54+
pipenv install graphql-core
5555

5656

5757
## Usage
5858

59-
GraphQL-core provides two important capabilities: building a type schema, and
59+
GraphQL-core provides two important capabilities: building a type schema and
6060
serving queries against that type schema.
6161

62-
First, build a GraphQL type schema which maps to your code base:
62+
First, build a GraphQL type schema which maps to your codebase:
6363

6464
```python
6565
from graphql import (
@@ -75,7 +75,7 @@ schema = GraphQLSchema(
7575
}))
7676
```
7777

78-
This defines a simple schema with one type and one field, that resolves to a fixed
78+
This defines a simple schema, with one type and one field, that resolves to a fixed
7979
value. The `resolve` function can return a value, a co-routine object or a list of
8080
these. It takes two positional arguments; the first one provides the root or the
8181
resolved parent field, the second one provides a `GraphQLResolveInfo` object which
@@ -89,7 +89,7 @@ where the context is passed separately and arguments are passed as a single obje
8989
Also note that GraphQL fields must be passed as a `GraphQLField` object explicitly.
9090
Similarly, GraphQL arguments must be passed as `GraphQLArgument` objects.
9191

92-
A more complex example is included in the top level [tests](tests) directory.
92+
A more complex example is included in the top-level [tests](tests) directory.
9393

9494
Then, serve the result of a query against that type schema.
9595

docs/intro.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ Getting started
3131

3232
You can install GraphQL-core 3 using pip_::
3333

34-
pip install "graphql-core>=3"
34+
pip install graphql-core
3535

3636
You can also install GraphQL-core 3 with pipenv_, if you prefer that::
3737

38-
pipenv install "graphql-core>=3"
38+
pipenv install graphql-core
3939

4040
Now you can start using GraphQL-core 3 by importing from the top-level
4141
:mod:`graphql` package. Nearly everything defined in the sub-packages

src/graphql/language/source.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,9 @@ def __init__(
1919
) -> None:
2020
"""Initialize source input.
2121
22-
2322
``name`` and ``location_offset`` are optional. They are useful for clients who
2423
store GraphQL documents in source files; for example, if the GraphQL input
25-
starts at line 40 in a file named Foo.graphql, it might be useful for name
24+
starts at line 40 in a file named Foo.graphql, it might be useful for ``name``
2625
to be "Foo.graphql" and location to be ``(40, 0)``.
2726
2827
line and column in location_offset are 1-indexed

src/graphql/language/visitor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ def visit(
221221
) -> Any:
222222
"""Visit each node in an AST.
223223
224-
:func:`~.visit` will walk through an AST using a depth first traversal, calling the
224+
:func:`~.visit` will walk through an AST using a depth-first traversal, calling the
225225
visitor's enter methods at each node in the traversal, and calling the leave methods
226226
after visiting that node and all of its child nodes.
227227

0 commit comments

Comments
 (0)