1- from graphql .execution .middleware import middleware_chain
2- from graphql .execution .middleware import get_middleware_resolvers
3- from graphql .language .parser import parse
1+ from __future__ import print_function
2+
43from graphql .execution import MiddlewareManager , execute
4+ from graphql .execution .middleware import (get_middleware_resolvers ,
5+ middleware_chain )
6+ from graphql .language .parser import parse
57from graphql .type import (GraphQLArgument , GraphQLBoolean , GraphQLField ,
6- GraphQLInt , GraphQLList , GraphQLObjectType ,
7- GraphQLSchema , GraphQLString , GraphQLNonNull , GraphQLID )
8+ GraphQLID , GraphQLInt , GraphQLList , GraphQLNonNull ,
9+ GraphQLObjectType , GraphQLSchema , GraphQLString )
810from promise import Promise
911
1012
@@ -120,9 +122,9 @@ def __init__(self, char):
120122 self .char = char
121123
122124 def resolve (self , next , * args , ** kwargs ):
123- print (f' resolve() called for middleware { self .char } ' )
125+ print (" resolve() called for middleware {}" . format ( self .char ) )
124126 return next (* args , ** kwargs ).then (
125- lambda x : print (f' then() for { self .char } ' )
127+ lambda x : print (" then() for {}" . format ( self .char ) )
126128 )
127129
128130 middlewares = [
@@ -154,4 +156,4 @@ def func(): return
154156
155157def assert_stdout (capsys , expected_stdout ):
156158 captured = capsys .readouterr ()
157- assert captured .out == expected_stdout
159+ assert captured .out == expected_stdout
0 commit comments