@@ -52,13 +52,13 @@ class PatchFields(NamedTuple):
52
52
"""Optionally labelled set of fields to be used as a patch."""
53
53
54
54
label : str | None
55
- fields : GroupedFieldSet
55
+ grouped_field_set : GroupedFieldSet
56
56
57
57
58
58
class FieldsAndPatches (NamedTuple ):
59
59
"""Tuple of collected fields and patches to be applied."""
60
60
61
- fields : GroupedFieldSet
61
+ grouped_field_set : GroupedFieldSet
62
62
patches : list [PatchFields ]
63
63
64
64
@@ -79,7 +79,7 @@ def collect_fields(
79
79
80
80
For internal use only.
81
81
"""
82
- fields : dict [str , list [FieldNode ]] = defaultdict (list )
82
+ grouped_field_set : dict [str , list [FieldNode ]] = defaultdict (list )
83
83
patches : list [PatchFields ] = []
84
84
collect_fields_impl (
85
85
schema ,
@@ -88,11 +88,11 @@ def collect_fields(
88
88
operation ,
89
89
runtime_type ,
90
90
operation .selection_set ,
91
- fields ,
91
+ grouped_field_set ,
92
92
patches ,
93
93
set (),
94
94
)
95
- return FieldsAndPatches (fields , patches )
95
+ return FieldsAndPatches (grouped_field_set , patches )
96
96
97
97
98
98
def collect_subfields (
@@ -114,11 +114,11 @@ def collect_subfields(
114
114
115
115
For internal use only.
116
116
"""
117
- sub_field_nodes : dict [str , list [FieldNode ]] = defaultdict (list )
117
+ sub_grouped_field_set : dict [str , list [FieldNode ]] = defaultdict (list )
118
118
visited_fragment_names : set [str ] = set ()
119
119
120
120
sub_patches : list [PatchFields ] = []
121
- sub_fields_and_patches = FieldsAndPatches (sub_field_nodes , sub_patches )
121
+ sub_fields_and_patches = FieldsAndPatches (sub_grouped_field_set , sub_patches )
122
122
123
123
for node in field_group :
124
124
if node .selection_set :
@@ -129,7 +129,7 @@ def collect_subfields(
129
129
operation ,
130
130
return_type ,
131
131
node .selection_set ,
132
- sub_field_nodes ,
132
+ sub_grouped_field_set ,
133
133
sub_patches ,
134
134
visited_fragment_names ,
135
135
)
@@ -143,7 +143,7 @@ def collect_fields_impl(
143
143
operation : OperationDefinitionNode ,
144
144
runtime_type : GraphQLObjectType ,
145
145
selection_set : SelectionSetNode ,
146
- fields : dict [str , list [FieldNode ]],
146
+ grouped_field_set : dict [str , list [FieldNode ]],
147
147
patches : list [PatchFields ],
148
148
visited_fragment_names : set [str ],
149
149
) -> None :
@@ -154,7 +154,7 @@ def collect_fields_impl(
154
154
if isinstance (selection , FieldNode ):
155
155
if not should_include_node (variable_values , selection ):
156
156
continue
157
- fields [get_field_entry_key (selection )].append (selection )
157
+ grouped_field_set [get_field_entry_key (selection )].append (selection )
158
158
elif isinstance (selection , InlineFragmentNode ):
159
159
if not should_include_node (
160
160
variable_values , selection
@@ -184,7 +184,7 @@ def collect_fields_impl(
184
184
operation ,
185
185
runtime_type ,
186
186
selection .selection_set ,
187
- fields ,
187
+ grouped_field_set ,
188
188
patches ,
189
189
visited_fragment_names ,
190
190
)
@@ -229,7 +229,7 @@ def collect_fields_impl(
229
229
operation ,
230
230
runtime_type ,
231
231
fragment .selection_set ,
232
- fields ,
232
+ grouped_field_set ,
233
233
patches ,
234
234
visited_fragment_names ,
235
235
)
0 commit comments