@@ -34,7 +34,7 @@ examples.
34
34
35
35
## Getting started
36
36
37
- An overview of GraphQL in general is available in the
37
+ A general overview of GraphQL is available in the
38
38
[ README] ( https://github.com/graphql/graphql-spec/blob/main/README.md ) for the
39
39
[ Specification for GraphQL] ( https://github.com/graphql/graphql-spec ) . That overview
40
40
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.
46
46
47
47
GraphQL-core 3 can be installed from PyPI using the built-in pip command:
48
48
49
- python -m pip install " graphql-core>=3"
49
+ python -m pip install graphql-core
50
50
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
52
52
virtual environment:
53
53
54
- pipenv install " graphql-core>=3"
54
+ pipenv install graphql-core
55
55
56
56
57
57
## Usage
58
58
59
- GraphQL-core provides two important capabilities: building a type schema, and
59
+ GraphQL-core provides two important capabilities: building a type schema and
60
60
serving queries against that type schema.
61
61
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 :
63
63
64
64
``` python
65
65
from graphql import (
@@ -75,7 +75,7 @@ schema = GraphQLSchema(
75
75
}))
76
76
```
77
77
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
79
79
value. The ` resolve ` function can return a value, a co-routine object or a list of
80
80
these. It takes two positional arguments; the first one provides the root or the
81
81
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
89
89
Also note that GraphQL fields must be passed as a ` GraphQLField ` object explicitly.
90
90
Similarly, GraphQL arguments must be passed as ` GraphQLArgument ` objects.
91
91
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.
93
93
94
94
Then, serve the result of a query against that type schema.
95
95
0 commit comments