Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick91 committed Feb 4, 2025
1 parent 57c4ac1 commit 941bbf6
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 31 deletions.
29 changes: 0 additions & 29 deletions strawberry/http/async_base_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -524,35 +524,6 @@ async def parse_http_body(
protocol=protocol,
)

async def process_incremental_result(
self, request: Request, result: IncrementalResult
) -> GraphQLHTTPResponse:
result = await self.schema._handle_execution_result(
context=self.schema.execution_context,
result=result,
extensions_runner=self.schema.extensions_runner,
process_errors=self.schema.process_errors,
)

if isinstance(result, IncrementalDeferResult):
return {
"data": result.data,
"errors": result.errors,
"path": result.path,
"label": result.label,
"extensions": result.extensions,
}
if isinstance(result, IncrementalStreamResult):
return {
"items": result.items,
"errors": result.errors,
"path": result.path,
"label": result.label,
"extensions": result.extensions,
}

raise ValueError(f"Unsupported incremental result type: {type(result)}")

async def process_subsequent_result(

Check warning on line 527 in strawberry/http/async_base_view.py

View check run for this annotation

Codecov / codecov/patch

strawberry/http/async_base_view.py#L527

Added line #L527 was not covered by tests
self,
request: Request,
Expand Down
2 changes: 0 additions & 2 deletions tests/http/incremental/test_defer.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ async def test_basic_defer(method: Literal["get", "post"], http_client: HttpClie
"incremental": [
{
"data": {"name": "Thiago Bellini"},
# TODO: we need to move these out of the data.
"extensions": {"example": "example"},
}
],
"completed": [{"id": "0"}],
Expand Down

0 comments on commit 941bbf6

Please sign in to comment.