rmosolgo/graphql-ruby

Parser does not allow operation names that match the built in operation types

swalkinshaw opened this issue · 1 comments

Describe the bug

Ruby parser mistakenly treats operation names that match the built-in operation types (subscription, query, mutation) as operations and fails expecting an LCURLY after them.

The C parser treats these correctly.

Versions

graphql version: latest

Steps to reproduce

https://github.com/rmosolgo/graphql-ruby/compare/fix-operation-name-parsing?expand=1

Expected behavior

These operation names are valid and should work

Actual behavior

GraphQL::ParseError: Expected LCURLY, actual: SUBSCRIPTION ("subscription") at [1, 7]

Oops! fixed and shipped in 2.3.10 👍