@@ -106,7 +106,7 @@ async def anext(iterator: AsyncIterator) -> Any: # noqa: A001
106106 "subscribe" ,
107107 "AsyncPayloadRecord" ,
108108 "DeferredFragmentRecord" ,
109- "StreamRecord " ,
109+ "StreamItemsRecord " ,
110110 "ExecutionResult" ,
111111 "ExecutionContext" ,
112112 "ExperimentalIncrementalExecutionResults" ,
@@ -1772,7 +1772,7 @@ def execute_stream_field(
17721772 ) -> AsyncPayloadRecord :
17731773 """Execute stream field."""
17741774 is_awaitable = self .is_awaitable
1775- async_payload_record = StreamRecord (
1775+ async_payload_record = StreamItemsRecord (
17761776 label , item_path , None , parent_context , self
17771777 )
17781778 completed_item : Any
@@ -1865,7 +1865,7 @@ async def execute_stream_async_iterator_item(
18651865 field_group : FieldGroup ,
18661866 info : GraphQLResolveInfo ,
18671867 item_type : GraphQLOutputType ,
1868- async_payload_record : StreamRecord ,
1868+ async_payload_record : StreamItemsRecord ,
18691869 item_path : Path ,
18701870 ) -> Any :
18711871 """Execute stream iterator item."""
@@ -1910,7 +1910,7 @@ async def execute_stream_async_iterator(
19101910
19111911 while True :
19121912 item_path = Path (path , index , None )
1913- async_payload_record = StreamRecord (
1913+ async_payload_record = StreamItemsRecord (
19141914 label , item_path , async_iterator , previous_async_payload_record , self
19151915 )
19161916
@@ -1961,7 +1961,10 @@ def filter_subsequent_payloads(
19611961 # async_record points to a path unaffected by this payload
19621962 continue
19631963 # async_record path points to nulled error field
1964- if isinstance (async_record , StreamRecord ) and async_record .async_iterator :
1964+ if (
1965+ isinstance (async_record , StreamItemsRecord )
1966+ and async_record .async_iterator
1967+ ):
19651968 self ._canceled_iterators .add (async_record .async_iterator )
19661969 del self .subsequent_payloads [async_record ]
19671970
@@ -1975,7 +1978,7 @@ def get_completed_incremental_results(self) -> list[IncrementalResult]:
19751978 if not async_payload_record .completed .is_set ():
19761979 continue
19771980 del self .subsequent_payloads [async_payload_record ]
1978- if isinstance (async_payload_record , StreamRecord ):
1981+ if isinstance (async_payload_record , StreamItemsRecord ):
19791982 items = async_payload_record .items
19801983 if async_payload_record .is_completed_async_iterator :
19811984 # async iterable resolver finished but there may be pending payload
@@ -2659,7 +2662,7 @@ def add_data(self, data: AwaitableOrValue[dict[str, Any] | None]) -> None:
26592662 self ._data_added .set ()
26602663
26612664
2662- class StreamRecord :
2665+ class StreamItemsRecord :
26632666 """A record collecting items marked with the stream directive"""
26642667
26652668 errors : list [GraphQLError ]
@@ -2735,4 +2738,4 @@ def set_is_completed_async_iterator(self) -> None:
27352738 self ._items_added .set ()
27362739
27372740
2738- AsyncPayloadRecord = Union [DeferredFragmentRecord , StreamRecord ]
2741+ AsyncPayloadRecord = Union [DeferredFragmentRecord , StreamItemsRecord ]
0 commit comments