Avoid parse ambiguity on types & extensions
At a glance​
- Identifier: #598
- Stage: RFC3: Accepted
- Champion: @leebyron
- PR: Avoid parse ambiguity on types & extensions
Timeline​
- Added to 2019-08-01 WG agenda
- Spec PR created on 2019-07-23 by leebyron
- Commit pushed: Avoid parse ambiguity on type extensions on 2019-07-23 by @leebyron
Partial fix to #564, adds lookahead constraints to type system extensions to remove ambiguity or inefficiency from the grammar.
The GraphQL grammar should be parsed in linear type with at most one lookahead. Since extensions have an optional
{ }
body, finding the token{
should always attempt to parse the relevant portion of the type extension rather than completing the type extension and attempting to parse the query shorthand SelectionSet.