@@ -169,8 +169,8 @@ def extend_named_type(type_: GraphQLNamedType) -> GraphQLNamedType:
169
169
170
170
def extend_directive (directive : GraphQLDirective ) -> GraphQLDirective :
171
171
kwargs = directive .to_kwargs ()
172
- return GraphQLDirective ( # type: ignore
173
- ** {
172
+ return GraphQLDirective (
173
+ ** { # type: ignore
174
174
** kwargs ,
175
175
"args" : {name : extend_arg (arg ) for name , arg in kwargs ["args" ].items ()},
176
176
}
@@ -188,8 +188,11 @@ def extend_input_object_type(
188
188
** kwargs ,
189
189
"fields" : lambda : {
190
190
** {
191
- name : GraphQLInputField ( # type: ignore
192
- ** {** field .to_kwargs (), "type_" : replace_type (field .type )}
191
+ name : GraphQLInputField (
192
+ ** { # type: ignore
193
+ ** field .to_kwargs (),
194
+ "type_" : replace_type (field .type ),
195
+ }
193
196
)
194
197
for name , field in kwargs ["fields" ].items ()
195
198
},
@@ -306,17 +309,20 @@ def extend_union_type(type_: GraphQLUnionType) -> GraphQLUnionType:
306
309
)
307
310
308
311
def extend_field (field : GraphQLField ) -> GraphQLField :
309
- return GraphQLField ( # type: ignore
310
- ** {
312
+ return GraphQLField (
313
+ ** { # type: ignore
311
314
** field .to_kwargs (),
312
315
"type_" : replace_type (field .type ),
313
316
"args" : {name : extend_arg (arg ) for name , arg in field .args .items ()},
314
317
}
315
318
)
316
319
317
320
def extend_arg (arg : GraphQLArgument ) -> GraphQLArgument :
318
- return GraphQLArgument ( # type: ignore
319
- ** {** arg .to_kwargs (), "type_" : replace_type (arg .type )}
321
+ return GraphQLArgument (
322
+ ** { # type: ignore
323
+ ** arg .to_kwargs (),
324
+ "type_" : replace_type (arg .type ),
325
+ }
320
326
)
321
327
322
328
# noinspection PyShadowingNames
@@ -358,13 +364,17 @@ def resolve_type(type_name: str) -> GraphQLNamedType:
358
364
operation_types [operation ] = operation_type .type .name .value
359
365
360
366
# Then produce and return a Schema with these types.
361
- return GraphQLSchema ( # type: ignore
367
+ return GraphQLSchema (
362
368
# Note: While this could make early assertions to get the correctly
363
369
# typed values, that would throw immediately while type system
364
370
# validation with validateSchema() will produce more actionable results.
365
- query = get_maybe_type_by_name (operation_types [OperationType .QUERY ]),
366
- mutation = get_maybe_type_by_name (operation_types [OperationType .MUTATION ]),
367
- subscription = get_maybe_type_by_name (
371
+ query = get_maybe_type_by_name ( # type: ignore
372
+ operation_types [OperationType .QUERY ]
373
+ ),
374
+ mutation = get_maybe_type_by_name ( # type: ignore
375
+ operation_types [OperationType .MUTATION ]
376
+ ),
377
+ subscription = get_maybe_type_by_name ( # type: ignore
368
378
operation_types [OperationType .SUBSCRIPTION ]
369
379
),
370
380
types = list (type_map .values ()),
0 commit comments