RFC 3 / Accepted

Avoid parse ambiguity on types & extensions

Opened on2019-07-23
Merged on2021-04-08

At a glance

Spec PR description

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.

Timeline