Skip to content

feat: Stable GraphQL error contract and request correlation - #118

Open
felixgateru wants to merge 1 commit into
mainfrom
feat/graphql-error-contract
Open

felixgateru wants to merge 1 commit into
mainfrom
feat/graphql-error-contract

Conversation

@felixgateru

@felixgateru felixgateru commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

GraphQL clients can now classify failures using stable error codes instead of parsing message text, and match a failed request to server logs using its request ID.

  • Define the nine v1 error codes, retryability, safe messages, and optional retry delay through one shared error mapping.
  • Return the same validated request ID in the HTTP header and GraphQL errors, attach it to the request tracing span and GraphQL context, and allow browser clients to send and read the header through CORS.
  • Share response decoding between browser and server clients. Malformed JSON envelopes produce a controlled client error; raw clients retain valid partial data alongside errors.
  • Resolve conflicts with current main while preserving refresh-token authentication behavior and PostgreSQL/SQLite support.
  • Patch affected UI/docs dependencies so the required production security audits pass.

Validation on signed commit 0956e95: all GitHub checks passed, including Rust formatting/linting and PostgreSQL/SQLite suites, UI tests/build/audit, docs build/audit, API contract checks, OpenAPI validation, and protobuf checks. Regression tests cover malformed HTTP 200/503 replies, partial data, request-ID validation and logs, GraphQL extension context, CORS, and database-backed resolver errors. No unresolved review threads remain.

Closes #101.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 15, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
atom-docs 0956e95 Commit Preview URL

Branch Preview URL
Oct 12 2026, 03:01 PM

@felixgateru
felixgateru force-pushed the feat/graphql-error-contract branch from 69458a2 to fa7f2d1 Compare September 15, 2026 10:47
@felixgateru felixgateru changed the title Stable GraphQL error contract and request correlation feat: Stable GraphQL error contract and request correlation Sep 15, 2026
Implement the v1 error contract, validate malformed client responses, correlate request logs and GraphQL context, enable browser request IDs, and refresh dependencies to pass audits. Resolves #101.

Co-authored-by: Felix Gateru <felix.gateru@gmail.com>
@arvindh123
arvindh123 force-pushed the feat/graphql-error-contract branch from 5f2521d to 0956e95 Compare October 12, 2026 14:58
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.

Feature: stable GraphQL error contract and request correlation

2 participants