Allow full unicode range
At a glance​
- Identifier: #849
- Stage: RFC3: Accepted
- Champion: @leebyron
- PR: Allow full unicode range
Timeline​
- Commit pushed: Editorial on 2022-06-02 by @leebyron
- Added to 2021-07-01 WG agenda
- Mentioned in 2021-07-01 WG notes
- Added to 2021-06-03 WG agenda
- Mentioned in 2021-06-03 WG notes
- Commit pushed: Revised RFC after feedback on 2021-05-18 by @leebyron
- Added to 2021-05-13 WG agenda
- Mentioned in 2021-05-13 WG notes
- Spec PR created on 2021-04-13 by leebyron
- Commit pushed: RFC: Allow full unicode range on 2021-04-13 by @leebyron
This spec text implements #687 (full context and details there) and also introduces a new escape sequence.
Three distinct changes:
- Change SourceCharacter to allow points above 0xFFFF, now to 0x10FFFF.
- Allow surrogate pairs within StringValue. This handles illegal pairs with a parse error.
- 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