Commit a85fa42
feat(core): add X-Correlation-ID header to all GraphQL requests (bigcommerce#2976)
* feat(core): add X-Correlation-ID header to all GraphQL requests
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>
* fix(core): wrap correlation-id import in try/catch for config resolution
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>
* chore: change correlation-id changeset to patch
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent a8dd99e commit a85fa42
3 files changed
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
55 | 63 | | |
56 | 64 | | |
57 | 65 | | |
| |||
0 commit comments