Skip to content

Add configureHttpRequestHeaders callback to IInterceptor - #20

Merged
clement911 merged 3 commits into
mainfrom
feat/configurehttprequestheaders-callback
Nov 13, 2026
Merged

clement911 merged 3 commits into
mainfrom
feat/configurehttprequestheaders-callback

Conversation

@matnun-br

Copy link
Copy Markdown
Contributor

No description provided.

@matnun-br
matnun-br requested a review from clement911 November 13, 2026 00:53
@matnun-br
matnun-br requested review from greg-betterreports and a balanced review from Copilot November 13, 2026 00:53
@matnun-br
matnun-br marked this pull request as draft November 13, 2026 00:53

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported for the per-request header customization change.

No open issues 🎉

What changed in this PR

Adds per-request HTTP header customization to the interceptor pipeline, allowing interceptors to configure headers without changing shared client options.

Changes:

  • Introduces an ExecuteRequestAsync delegate with an optional header callback and updates interceptor implementations.
  • Preserves callback order through chained interceptors and retries, with tests covering both paths.
  • Bumps the package version to 3.0.0 for the breaking interface change.
File Description
GraphQLSharp/​GraphQLSharp.csproj Bumps the package version to 3.0.0.
GraphQLSharp/​Client/​Interception/​RetryInterceptor.cs Uses the new delegate for retry attempts.
GraphQLSharp/​Client/​Interception/​NoOpInterceptor.cs Adapts pass-through execution to the new delegate.
GraphQLSharp/​Client/​Interception/​IInterceptor.cs Defines the header-aware delegate and updates the interface.
GraphQLSharp/​Client/​Interception/​ChainedInterceptor.cs Composes header callbacks in outer-to-inner request order.
GraphQLSharp/​Client/​GraphQLClient.cs Applies interceptor headers after client-option headers.
GraphQLSharp.Tests/​TestInterceptor.cs Updates the test helper to the new delegate signature.
GraphQLSharp.Tests/​ChainedInterceptorTests.cs Tests header order and preservation across retries.

Review effort: Balanced

@matnun-br
matnun-br marked this pull request as ready for review November 13, 2026 00:55
@matnun-br matnun-br assigned clement911 and unassigned Copilot Nov 13, 2026
@clement911
clement911 merged commit c93419f into main Nov 13, 2026
1 check passed
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.

4 participants