Skip to content

feat(core): add X-Correlation-ID header to all GraphQL requests#2976

Merged
jorgemoya merged 3 commits intocanaryfrom
LTRAC-226/correlation-id
Apr 14, 2026
Merged

feat(core): add X-Correlation-ID header to all GraphQL requests#2976
jorgemoya merged 3 commits intocanaryfrom
LTRAC-226/correlation-id

Conversation

@jorgemoya
Copy link
Copy Markdown
Contributor

@jorgemoya jorgemoya commented Apr 13, 2026

Linear: LTRAC-226

What/Why?

Adds a stable X-Correlation-ID UUID header to every GraphQL request made during a page render. The UUID is generated once per render via React.cache and reused across all fetches in that render, making it straightforward to correlate related requests in server logs.

This is the first in a series of PRs splitting the work from #2910 into smaller, reviewable pieces.

Rollout/Rollback

No feature flag needed — the header is additive and has no effect on existing behavior. Rollback is a simple revert.

Testing

  • pnpm build passes
  • pnpm lint passes
  • Verify in dev tools Network tab that all GraphQL requests within a single page load share the same X-Correlation-ID value, and that a new page navigation produces a different UUID

🤖 Generated with Claude Code

Each page render gets a stable UUID (via React.cache) that persists
across all fetches within the same render, enabling easier request
tracing in server logs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 13, 2026

🦋 Changeset detected

Latest commit: 89056d3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@bigcommerce/catalyst-core Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
catalyst Ready Ready Preview, Comment Apr 13, 2026 9:13pm

Request Review

The dynamic import of correlation-id.ts fails during next.config.ts
resolution because React.cache is unavailable in that context. Wrap
in try/catch to match the existing pattern for next-intl/server.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

Bundle Size Report

Comparing against baseline from a8dd99e (2026-04-13).

No bundle size changes detected.

@jorgemoya jorgemoya changed the title LTRAC-226: Add X-Correlation-ID header to all GraphQL requests LTRAC-226: feat(core): add X-Correlation-ID header to all GraphQL requests Apr 13, 2026
@jorgemoya jorgemoya changed the title LTRAC-226: feat(core): add X-Correlation-ID header to all GraphQL requests feat(core): add X-Correlation-ID header to all GraphQL requests Apr 13, 2026
@jorgemoya
Copy link
Copy Markdown
Contributor Author

Screenshot 2026-04-13 at 2 45 03 PM

@jorgemoya jorgemoya marked this pull request as ready for review April 13, 2026 19:45
@jorgemoya jorgemoya requested a review from a team as a code owner April 13, 2026 19:45
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jorgemoya jorgemoya added this pull request to the merge queue Apr 14, 2026
Merged via the queue into canary with commit a85fa42 Apr 14, 2026
23 of 27 checks passed
@jorgemoya jorgemoya deleted the LTRAC-226/correlation-id branch April 14, 2026 18:53
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