Skip to content

Commit 7c18bed

Browse files
committed
Rename collect_sub_fields to collect_subfields
In order to make this correspond better to GraphQL-js where it is collectSubfields, not collectSubFields.
1 parent 35ce9d7 commit 7c18bed

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/graphql/execution/collect_fields.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from .values import get_directive_values
2121

2222

23-
__all__ = ["collect_fields", "collect_sub_fields"]
23+
__all__ = ["collect_fields", "collect_subfields"]
2424

2525

2626
def collect_fields(
@@ -47,19 +47,19 @@ def collect_fields(
4747
return fields
4848

4949

50-
def collect_sub_fields(
50+
def collect_subfields(
5151
schema: GraphQLSchema,
5252
fragments: Dict[str, FragmentDefinitionNode],
5353
variable_values: Dict[str, Any],
5454
return_type: GraphQLObjectType,
5555
field_nodes: List[FieldNode],
5656
) -> Dict[str, List[FieldNode]]:
57-
"""Collect sub fields.
57+
"""Collect subfields.
5858
5959
Given a list of field nodes, collects all the subfields of the passed in fields,
6060
and returns them at the end.
6161
62-
collect_sub_fields requires the "return type" of an object. For a field that
62+
collect_subfields requires the "return type" of an object. For a field that
6363
returns an Interface or Union type, the "return type" will be the actual
6464
object type returned by that field.
6565

src/graphql/execution/execute.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
is_non_null_type,
5656
is_object_type,
5757
)
58-
from .collect_fields import collect_fields, collect_sub_fields
58+
from .collect_fields import collect_fields, collect_subfields
5959
from .middleware import MiddlewareManager
6060
from .values import get_argument_values, get_variable_values
6161

@@ -948,7 +948,7 @@ def collect_subfields(
948948
)
949949
sub_field_nodes = cache.get(key)
950950
if sub_field_nodes is None:
951-
sub_field_nodes = collect_sub_fields(
951+
sub_field_nodes = collect_subfields(
952952
self.schema,
953953
self.fragments,
954954
self.variable_values,

0 commit comments

Comments
 (0)