Skip to content

Conversation

@jwaldrip
Copy link

Summary

Test plan

  • Added comprehensive Unicode tests (64 new tests)
  • All 1506 tests pass
  • Variable-width escapes work correctly
  • Surrogate pairs properly combined
  • Invalid Unicode scalar values rejected with appropriate errors

🤖 Generated with Claude Code

This implements Full Unicode Support as defined in GraphQL specification
September 2025 (RFCs absinthe-graphql#805, absinthe-graphql#1040, absinthe-graphql#1053, absinthe-graphql#1142).

Changes:
- Add support for variable-width Unicode escape sequences (\u{XXXXXX})
  allowing representation of all Unicode scalar values up to U+10FFFF
- Add validation for Unicode scalar values in escape sequences
- Add support for surrogate pair decoding in fixed-width escapes (\uXXXX)
  for legacy compatibility with supplementary plane characters
- Properly reject invalid escape sequences:
  - Lone high surrogates (U+D800-U+DBFF)
  - Lone low surrogates (U+DC00-U+DFFF)
  - Out of range values (>U+10FFFF)
  - Surrogates in variable-width escapes
- Update Parse phase to handle new Unicode escape error type
- Add comprehensive test suite covering:
  - Basic Unicode in strings
  - BMP escape sequences (\uXXXX)
  - Extended escape sequences (\u{XXXXXX})
  - Surrogate pair handling
  - Emoji and supplementary plane characters
  - Invalid escape rejection
  - Block strings with Unicode
  - Edge cases

The implementation maintains full backward compatibility with existing
GraphQL documents while enabling the new Unicode features.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
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.

1 participant