This commit is contained in:
Dan 2018-05-27 10:17:36 +00:00 committed by GitHub
commit 593a209429
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 7 deletions

View File

@ -15,3 +15,4 @@
- id: pretty-format-json - id: pretty-format-json
args: args:
- --autofix - --autofix
- id: requirements-txt-fixer

View File

@ -207,7 +207,7 @@ Before:
```python ```python
class SomeMutation(Mutation): class SomeMutation(Mutation):
... ...
@classmethod @classmethod
def mutate(cls, instance, args, context, info): def mutate(cls, instance, args, context, info):
... ...
@ -218,7 +218,7 @@ With 2.0:
```python ```python
class SomeMutation(Mutation): class SomeMutation(Mutation):
... ...
def mutate(self, info, **args): def mutate(self, info, **args):
... ...
``` ```
@ -231,7 +231,7 @@ class SomeMutation(Mutation):
first_name = String(required=True) first_name = String(required=True)
last_name = String(required=True) last_name = String(required=True)
... ...
def mutate(self, info, first_name, last_name): def mutate(self, info, first_name, last_name):
... ...
``` ```
@ -250,7 +250,7 @@ If you are using Middelwares, you need to some adjustments:
Before: Before:
```python ```python
class MyGrapheneMiddleware(object): class MyGrapheneMiddleware(object):
def resolve(self, next_mw, root, args, context, info): def resolve(self, next_mw, root, args, context, info):
## Middleware code ## Middleware code
@ -261,7 +261,7 @@ class MyGrapheneMiddleware(object):
With 2.0: With 2.0:
```python ```python
class MyGrapheneMiddleware(object): class MyGrapheneMiddleware(object):
def resolve(self, next_mw, root, info, **args): def resolve(self, next_mw, root, info, **args):
context = info.context context = info.context

View File

@ -1,4 +1,4 @@
# Required library
Sphinx==1.5.3
# Docs template # Docs template
http://graphene-python.org/sphinx_graphene_theme.zip http://graphene-python.org/sphinx_graphene_theme.zip
# Required library
Sphinx==1.5.3