RFC 3 / Accepted

Allow full unicode range

Opened on
Merged on

At a glance

Project
GraphQL Spec
Identifier
#849
Stage
RFC 3 / Accepted
Champion
@leebyron
Updated
2022-06-03
Latest activity
Pull request merged on
Source

Pull request description

This spec text implements #687 (full context and details there) and also introduces a new escape sequence.

Three distinct changes:

  1. Change SourceCharacter to allow points above 0xFFFF, now to 0x10FFFF.
  2. Allow surrogate pairs within StringValue. This handles illegal pairs with a parse error.
  3. Introduce new syntax for full range code point EscapedUnicode. This syntax (\u{1F37A}) has been adopted by many other languages and I propose GraphQL adopt it as well.

(As a bonus, this removes the last instance of a regex in the lexer grammar!)

Reference implementation https://github.com/graphql/graphql-js/pull/3117

Closes #687 Closes #214

Timeline