You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: UPGRADE-v2.0.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
have been quite simplified, without the need to define a explicit Metaclass for each subtype.
5
5
6
6
It also improves the field resolvers, [simplifying the code](#simpler-resolvers) the
7
-
developer have to write to use them.
7
+
developer has to write to use them.
8
8
9
9
**Deprecations:**
10
10
*[`AbstractType`](#abstracttype-deprecated)
@@ -20,14 +20,14 @@ developer have to write to use them.
20
20
*[`Meta as Class arguments`](#meta-ass-class-arguments) (_only available for Python 3_)
21
21
22
22
23
-
> The type metaclases are now deleted as are no longer necessary, if your code was depending
23
+
> The type metaclasses are now deleted as they are no longer necessary. If your code was depending
24
24
> on this strategy for creating custom attrs, see an [example on how to do it in 2.0](https://github.com/graphql-python/graphene/blob/2.0/graphene/tests/issues/test_425.py).
25
25
26
26
## Deprecations
27
27
28
28
### Simpler resolvers
29
29
30
-
All the resolvers in graphene have been simplified. If before resolvers must had received
30
+
All the resolvers in graphene have been simplified. If before resolvers required
31
31
four arguments `root`, `args`, `context` and `info`, now the `args` are passed as keyword arguments
32
32
and `context` and `info` will only be passed if the function is annotated with it.
33
33
@@ -112,7 +112,7 @@ class User(ObjectType):
112
112
113
113
### Mutation.Input
114
114
115
-
`Mutation.Input` is now deprecated in favor using `Mutation.Arguments` (`ClientIDMutation` still uses `Input`).
115
+
`Mutation.Input` is now deprecated in favor of using `Mutation.Arguments` (`ClientIDMutation` still uses `Input`).
116
116
117
117
Before:
118
118
@@ -135,7 +135,7 @@ class User(Mutation):
135
135
136
136
### Simpler resolvers
137
137
138
-
All the resolvers in graphene have been simplified. If before resolvers must had received
138
+
All the resolvers in graphene have been simplified. If before resolvers required
139
139
four arguments `root`, `args`, `context` and `info`, now the `args` are passed as keyword arguments
140
140
and `context` and `info` will only be passed if the function is annotated with it.
141
141
@@ -212,7 +212,7 @@ class Query(ObjectType):
212
212
213
213
## Node.get_node
214
214
215
-
The method `get_node` in `ObjectTypes` that have `Node` as interface, changes it's api.
215
+
The method `get_node` in `ObjectTypes` that have `Node` as interface, changes its API.
216
216
From `def get_node(cls, id, context, info)` to `def get_node(cls, info, id)`.
217
217
218
218
```python
@@ -251,7 +251,7 @@ Now only receives (`root`, `info`, `**input`)
251
251
### InputObjectType
252
252
253
253
If you are using `InputObjectType`, you now can access
254
-
it's fields via `getattr` (`my_input.myattr`) when resolving, instead of
254
+
its fields via `getattr` (`my_input.myattr`) when resolving, instead of
255
255
the classic way `my_input['myattr']`.
256
256
257
257
And also use custom defined properties on your input class.
0 commit comments