Skip to content

Commit 885e86a

Browse files
committed
Support for GraphQL-core 3.3.0a9
1 parent 108812c commit 885e86a

File tree

3 files changed

+13
-19
lines changed

3 files changed

+13
-19
lines changed

noxfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
GQL_CORE_VERSIONS = [
1414
"3.2.3",
15-
"3.3.0a8",
15+
"3.3.0a9",
1616
]
1717

1818
COMMON_PYTEST_OPTIONS = [

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,7 @@ ignore = [
323323
"Q002",
324324
"Q003",
325325
"W191",
326+
"PLR0915",
326327
]
327328

328329
[tool.ruff.lint.per-file-ignores]

strawberry/schema/schema.py

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@
8484
from collections.abc import Iterable, Mapping
8585
from typing_extensions import TypeAlias
8686

87-
from graphql.execution.collect_fields import FieldGroup # type: ignore
8887
from graphql.language import DocumentNode
8988
from graphql.pyutils import Path
9089
from graphql.type import GraphQLResolveInfo
@@ -176,17 +175,18 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
176175

177176
self.operation_extensions = operation_extensions
178177

179-
def build_resolve_info(
180-
self,
181-
field_def: GraphQLField,
182-
field_group: FieldGroup,
183-
parent_type: GraphQLObjectType,
184-
path: Path,
185-
) -> GraphQLResolveInfo:
186-
if IS_GQL_33:
178+
if IS_GQL_33:
179+
180+
def build_resolve_info(
181+
self,
182+
field_def: GraphQLField,
183+
field_nodes: list[FieldNode],
184+
parent_type: GraphQLObjectType,
185+
path: Path,
186+
) -> GraphQLResolveInfo:
187187
return _OperationContextAwareGraphQLResolveInfo( # type: ignore
188-
field_group.fields[0].node.name.value,
189-
field_group.to_nodes(),
188+
field_nodes[0].name.value,
189+
field_nodes,
190190
field_def.type,
191191
parent_type,
192192
path,
@@ -200,13 +200,6 @@ def build_resolve_info(
200200
self.operation_extensions,
201201
)
202202

203-
return super().build_resolve_info(
204-
field_def,
205-
field_group,
206-
parent_type,
207-
path,
208-
)
209-
210203

211204
class Schema(BaseSchema):
212205
def __init__(

0 commit comments

Comments
 (0)