Skip to content

Log GraphQL field errors from fetchGraphQL - #206

Merged
sdunster merged 1 commit into
mainfrom
claude/graphql-field-error-logging-9kyaq5
Sep 5, 2026
Merged

Log GraphQL field errors from fetchGraphQL#206
sdunster merged 1 commit into
mainfrom
claude/graphql-field-error-logging-9kyaq5

Conversation

@sdunster

@sdunster sdunster commented Sep 4, 2026

Copy link
Copy Markdown
Member

Summary

  • fetchGraphQL (web/src/lib/graphql.ts) now console.logs any GraphQL errors returned in a response, for both queries and mutations, as soon as the response body is parsed.
  • A single field error is logged in full (the raw error object).
  • Multiple field errors are summarised: a one-line count plus each error's path and message, rather than dumping the full array.
  • This is purely additive logging — it doesn't change the existing behaviour where a mutation with field errors still throws MutationFieldError.

Test plan

  • npx tsc -b in web/ passes
  • npx eslint src/lib/graphql.ts passes
  • Manually exercised with SESLOGIN_FORCE_FIELD_ERRORS to confirm both the single-error and multi-error (* wildcard) console output

🤖 Generated with Claude Code

https://claude.ai/code/session_012ztXhoyPQ8tDu6CRk31GHh


Generated by Claude Code

Single errors are logged in full; multiple errors are summarised as
path/message pairs instead of dumping the whole array.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ztXhoyPQ8tDu6CRk31GHh
@sdunster
sdunster marked this pull request as ready for review September 5, 2026 00:51
@sdunster
sdunster merged commit e47408a into main Sep 5, 2026
1 check passed
@sdunster
sdunster deleted the claude/graphql-field-error-logging-9kyaq5 branch September 5, 2026 00:51
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