|
2 | 2 | from ..error import GraphQLError |
3 | 3 | from ..language import ast |
4 | 4 | from ..pyutils.defer import DeferredException |
5 | | -from ..type.definition import ( |
6 | | - GraphQLInterfaceType, |
7 | | - GraphQLUnionType, |
8 | | -) |
9 | | -from ..type.directives import ( |
10 | | - GraphQLIncludeDirective, |
11 | | - GraphQLSkipDirective, |
12 | | -) |
13 | | -from ..type.introspection import ( |
14 | | - SchemaMetaFieldDef, |
15 | | - TypeMetaFieldDef, |
16 | | - TypeNameMetaFieldDef, |
17 | | -) |
| 5 | +from ..type.definition import GraphQLInterfaceType, GraphQLUnionType |
| 6 | +from ..type.directives import GraphQLIncludeDirective, GraphQLSkipDirective |
| 7 | +from ..type.introspection import (SchemaMetaFieldDef, TypeMetaFieldDef, |
| 8 | + TypeNameMetaFieldDef) |
18 | 9 | from ..utils.type_from_ast import type_from_ast |
19 | 10 | from .values import get_argument_values, get_variable_values |
20 | 11 |
|
@@ -97,7 +88,7 @@ def __init__(self, data=None, errors=None, invalid=False): |
97 | 88 | errors = [ |
98 | 89 | error.value if isinstance(error, DeferredException) else error |
99 | 90 | for error in errors |
100 | | - ] |
| 91 | + ] |
101 | 92 |
|
102 | 93 | self.errors = errors |
103 | 94 |
|
@@ -170,7 +161,9 @@ def collect_fields(ctx, runtime_type, selection_set, fields, prev_fragment_names |
170 | 161 | fields[name].append(selection) |
171 | 162 |
|
172 | 163 | elif isinstance(selection, ast.InlineFragment): |
173 | | - if not should_include_node(ctx, directives) or not does_fragment_condition_match(ctx, selection, runtime_type): |
| 164 | + if not should_include_node( |
| 165 | + ctx, directives) or not does_fragment_condition_match( |
| 166 | + ctx, selection, runtime_type): |
174 | 167 | continue |
175 | 168 |
|
176 | 169 | collect_fields(ctx, runtime_type, selection.selection_set, fields, prev_fragment_names) |
@@ -255,6 +248,7 @@ def get_field_entry_key(node): |
255 | 248 |
|
256 | 249 |
|
257 | 250 | class ResolveInfo(object): |
| 251 | + |
258 | 252 | def __init__(self, field_name, field_asts, return_type, parent_type, context): |
259 | 253 | self.field_name = field_name |
260 | 254 | self.field_asts = field_asts |
|
0 commit comments