Parser fails on empty parenthesis without arguments #15

Closed
opened 2024-09-15 22:10:56 +02:00 by belka · 1 comment
Owner

Example:

{ workers() { id firstName lastName } }

It fails with an error:

unexpected ')'

expecting Argument

Example: ```graphql { workers() { id firstName lastName } } ``` It fails with an error: > unexpected ')' > > expecting Argument
belka added the
Kind
bug
label 2024-09-15 22:10:56 +02:00
belka added the
Status
fixed
label 2024-09-17 18:42:32 +02:00
Author
Owner

Works as expected as it seems. ArgumentsDefinition is defined as a list of InputValueDefinition in parens. And a list is defined as:

A subscript suffix “Symbol list” is shorthand for a list of one or more of that symbol, represented as an additional recursive production.

So if the parens are there, it least one argument should be given. I added a test to check this.

Works as expected as it seems. `ArgumentsDefinition` is defined as a list of `InputValueDefinition` in parens. And a list is defined as: > A subscript suffix “Symbol list” is shorthand for a list of one or more of that symbol, represented as an additional recursive production. So if the parens are there, it least one argument should be given. I added a test to check this.
belka closed this issue 2024-09-17 18:42:36 +02:00
belka added
Status
wontfix
and removed
Status
fixed
labels 2024-09-20 17:53:15 +02:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: OSS/graphql#15
No description provided.