@@ -56,7 +56,7 @@ class GraphQLView:
5656 encode = staticmethod (json_encode )
5757
5858 def __init__ (self , ** kwargs ):
59- super (GraphQLView , self ).__init__ ()
59+ super ().__init__ ()
6060 for key , value in kwargs .items ():
6161 if hasattr (self , key ):
6262 setattr (self , key , value )
@@ -177,7 +177,7 @@ async def __call__(self, request):
177177 * (
178178 ex
179179 if ex is not None and is_awaitable (ex )
180- else wrap_in_async (lambda : ex )( )
180+ else wrap_in_async (lambda x : x )( ex )
181181 for ex in execution_results
182182 )
183183 )
@@ -188,15 +188,15 @@ async def __call__(self, request):
188188 exec_res ,
189189 is_batch = isinstance (data , list ),
190190 format_error = self .format_error ,
191- encode = partial (self .encode , pretty = is_pretty ), # noqa: ignore
191+ encode = partial (self .encode , pretty = is_pretty ),
192192 )
193193
194194 if is_graphiql :
195195 graphiql_data = GraphiQLData (
196196 result = result ,
197- query = getattr ( all_params [0 ], " query" ) ,
198- variables = getattr ( all_params [0 ], " variables" ) ,
199- operation_name = getattr ( all_params [0 ], " operation_name" ) ,
197+ query = all_params [0 ]. query ,
198+ variables = all_params [0 ]. variables ,
199+ operation_name = all_params [0 ]. operation_name ,
200200 subscription_url = self .subscriptions ,
201201 headers = self .headers ,
202202 )
@@ -225,7 +225,7 @@ async def __call__(self, request):
225225 except HttpQueryError as err :
226226 parsed_error = GraphQLError (err .message )
227227 return web .Response (
228- body = self .encode (dict ( errors = [self .format_error (parsed_error )]) ),
228+ body = self .encode ({ " errors" : [self .format_error (parsed_error )]} ),
229229 status = err .status_code ,
230230 headers = err .headers ,
231231 content_type = "application/json" ,
0 commit comments