Skip to content

fix(graphql): send a default User-Agent on tool invocations - #2196

Closed
gkze wants to merge 1 commit into
UsefulSoftwareCo:mainfrom
gkze:codex/graphql-invocation-user-agent
Closed

gkze wants to merge 1 commit into
UsefulSoftwareCo:mainfrom
gkze:codex/graphql-invocation-user-agent

Conversation

@gkze

@gkze gkze commented Oct 7, 2026

Copy link
Copy Markdown

GraphQL introspection sets User-Agent: executor-graphql, but query and mutation requests omit an explicit User-Agent. Upstreams that require this header can therefore accept introspection and reject tool calls on runtimes that supply no default.

Set the same default on invocation before applying resolved headers. Caller-provided User-Agent values still override it case-insensitively; other static and authentication headers are unchanged. OpenAPI already uses this ordering.

Validation:

  • Regression failed before the fix: invocation inherited Node's node User-Agent rather than the explicit GraphQL default.
  • GraphQL package: 123 tests passed, including introspection/query/mutation header coverage and three custom header casing variants.
  • Selfhost API-to-sandbox end-to-end scenario passed for default and custom User-Agent, verified against outbound request headers.
  • GraphQL package typecheck, scoped lint, formatting and git diff --check passed.

This is a transport fix; no authentication, stored integration, or deployment changes. Full monorepo gates and production validation have not run. The e2e is API-only, so it produces a result artifact rather than a browser recording.

@RhysSullivan

Copy link
Copy Markdown
Collaborator

We're clearing the backlog ahead of the v2 launch, so we're closing this. If it still applies to v2, please open a new issue or PR against v2.

Sent from my Claude

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