Skip to content

[Nitro CLI] Add GraphQL-Client-Id header to CLI requests#9737

Merged
tobias-tengler merged 1 commit into
mainfrom
tte/send-client-id-through-cli
May 19, 2026
Merged

[Nitro CLI] Add GraphQL-Client-Id header to CLI requests#9737
tobias-tengler merged 1 commit into
mainfrom
tte/send-client-id-through-cli

Conversation

@tobias-tengler
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings May 19, 2026 09:04
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds support for sending a GraphQL-Client-Id header from Nitro CLI API requests, using a build-time generated client ID.

Changes:

  • Adds a GraphQLClientId header constant and ClientId context property.
  • Configures Nitro API HttpClient instances to emit the header when a client ID is available.
  • Extends build secret generation and adds global option tests around API key environment precedence.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/Nitro/Common/src/ChilliCream.Nitro.Client/NitroClientHeaders.cs Adds the GraphQL-Client-Id header name constant.
src/Nitro/Common/src/ChilliCream.Nitro.Client/INitroClientContextProvider.cs Exposes an optional client ID through the Nitro client context.
src/Nitro/Common/src/ChilliCream.Nitro.Client/Extensions/NitroClientServiceCollectionExtensions.cs Adds the client ID header to configured API HttpClients when present.
src/Nitro/CommandLine/test/CommandLine.Tests/GlobalOptionsTests.cs Adds tests for API key environment variable precedence.
src/Nitro/CommandLine/src/CommandLine/Services/NitroClientContext.cs Supplies the API client ID from generated build secrets.
src/Nitro/CommandLine/src/CommandLine/Directory.Build.targets Generates the NitroApiClientId build secret constant.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@tobias-tengler tobias-tengler merged commit cd0dfc4 into main May 19, 2026
146 checks passed
@tobias-tengler tobias-tengler deleted the tte/send-client-id-through-cli branch May 19, 2026 09:25
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