Skip to content

Add missing cancellation tokens to async stream operations#673

Open
extra2 wants to merge 1 commit intographql-dotnet:masterfrom
extra2:fix/add-cancellation-token-support
Open

Add missing cancellation tokens to async stream operations#673
extra2 wants to merge 1 commit intographql-dotnet:masterfrom
extra2:fix/add-cancellation-token-support

Conversation

@extra2
Copy link

@extra2 extra2 commented Jan 2, 2026

Fixed missing CancellationToken parameters in GraphQLHttpClient.cs:

  • Pass cancellationToken to ReadAsStreamAsync() on line 180
  • Pass cancellationToken to ReadToEndAsync() on line 193

This ensures proper cancellation support throughout the HTTP request pipeline, allowing operations to be cancelled promptly when requested.

Fixed missing CancellationToken parameters in GraphQLHttpClient.cs:
- Pass cancellationToken to ReadAsStreamAsync() on line 180
- Pass cancellationToken to ReadToEndAsync() on line 193

This ensures proper cancellation support throughout the HTTP request pipeline, allowing operations to be cancelled promptly when requested.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@JR-Morgan
Copy link

These overloads are only available in .NET core right?
Have you tried building the .NET Standard 2.0 target?

I suspect something like this would be needed.

#if NET8_0_OR_GREATER
//ReadAsStreamAsync(cancellationToken);
#else
//ReadAsStreamAsync();
#endif

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants