Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 5c63d22

Browse files
committedApr 7, 2024··
rename AsyncPayloadRecord to IncrementalDataRecord
Replicates graphql/graphql-js@b5813f0
1 parent 398d5cc commit 5c63d22

File tree

4 files changed

+165
-128
lines changed

4 files changed

+165
-128
lines changed
 

‎docs/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@
168168
graphql.execution.execute.DeferredFragmentRecord
169169
graphql.execution.execute.ExperimentalIncrementalExecutionResults
170170
graphql.execution.execute.StreamArguments
171-
graphql.execution.execute.StreamRecord
171+
graphql.execution.execute.StreamItemsRecord
172172
graphql.language.lexer.EscapeSequence
173173
graphql.language.visitor.EnterLeaveVisitor
174174
graphql.type.definition.TContext

‎src/graphql/execution/execute.py

+153-122
Large diffs are not rendered by default.

‎tests/execution/test_customize.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,15 @@ def uses_a_custom_execution_context_class():
4343

4444
class TestExecutionContext(ExecutionContext):
4545
def execute_field(
46-
self, parent_type, source, field_group, path, async_payload_record=None
46+
self,
47+
parent_type,
48+
source,
49+
field_group,
50+
path,
51+
incremental_data_record=None,
4752
):
4853
result = super().execute_field(
49-
parent_type, source, field_group, path, async_payload_record
54+
parent_type, source, field_group, path, incremental_data_record
5055
)
5156
return result * 2 # type: ignore
5257

‎tests/execution/test_stream.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -176,16 +176,17 @@ def can_print_stream_record():
176176
context = ExecutionContext.build(schema, parse("{ hero { id } }"))
177177
assert isinstance(context, ExecutionContext)
178178
record = StreamItemsRecord(None, None, None, None, context)
179-
assert str(record) == "StreamRecord(path=[])"
179+
assert str(record) == "StreamItemsRecord(path=[])"
180180
record = StreamItemsRecord(
181181
"foo", Path(None, "bar", "Bar"), None, record, context
182182
)
183183
assert (
184-
str(record) == "StreamRecord(" "path=['bar'], label='foo', parent_context)"
184+
str(record) == "StreamItemsRecord("
185+
"path=['bar'], label='foo', parent_context)"
185186
)
186187
record.items = ["hello", "world"]
187188
assert (
188-
str(record) == "StreamRecord("
189+
str(record) == "StreamItemsRecord("
189190
"path=['bar'], label='foo', parent_context, items)"
190191
)
191192

0 commit comments

Comments
 (0)
Please sign in to comment.