apollo-rs
apollo-rs copied to clipboard
No parsing syntax error for variables in constant values
Description
The following should produce a syntax error, as variables cannot be used in constant value positions:
query($id1: ID, $id2: ID = $id1) {
__typename
}
Apollo Compiler parses the above. By comparison, the graphql-js
reference implementation produces the following parse error:
Syntax Error: Unexpected variable "$id1" in constant value.
Steps to reproduce
Try parsing the above query.
Expected result
Expected syntax error.
Actual result
Apollo compiler successfully parses