From 7fad0c265a1877a409b252585981be370958a47b Mon Sep 17 00:00:00 2001 From: Daniel Gallagher Date: Fri, 25 May 2018 21:33:18 -0700 Subject: [PATCH] Run pre-commit on all files --- UPGRADE-v2.0.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/UPGRADE-v2.0.md b/UPGRADE-v2.0.md index 96aac143..5dc76154 100644 --- a/UPGRADE-v2.0.md +++ b/UPGRADE-v2.0.md @@ -207,7 +207,7 @@ Before: ```python class SomeMutation(Mutation): ... - + @classmethod def mutate(cls, instance, args, context, info): ... @@ -218,7 +218,7 @@ With 2.0: ```python class SomeMutation(Mutation): ... - + def mutate(self, info, **args): ... ``` @@ -231,7 +231,7 @@ class SomeMutation(Mutation): first_name = String(required=True) last_name = String(required=True) ... - + def mutate(self, info, first_name, last_name): ... ``` @@ -250,7 +250,7 @@ If you are using Middelwares, you need to some adjustments: Before: ```python -class MyGrapheneMiddleware(object): +class MyGrapheneMiddleware(object): def resolve(self, next_mw, root, args, context, info): ## Middleware code @@ -261,7 +261,7 @@ class MyGrapheneMiddleware(object): With 2.0: ```python -class MyGrapheneMiddleware(object): +class MyGrapheneMiddleware(object): def resolve(self, next_mw, root, info, **args): context = info.context