graphql-platform
graphql-platform copied to clipboard
Nitro Client fails to parse when graphql variables are part of arrays `[$someValue]`
trafficstars
Product
Nitro
Version
28.0.7
Link to minimal reproduction
https://gist.github.com/icanhasjonas/e6455e0d80e41059f2d918dfa514762d
Steps to reproduce
When referencing a variable in an array, the nitro parse seams to break, and making the whole document invalid.
Parser working (shows Run > etc)
mutation SomeMutation($someValue: String!) {
hello( a: ["some value"]) { a, b, c}
}
Not working
mutation SomeMutation($someValue: String!) {
hello( a: [$someValue]) { a, b, c}
}
What is expected?
The document should be parsable and the individually named actions in the editor should be recognized
What is actually happening?
As soon as you type $ in an array [$someVariable], all named queries, mutations etc are not recognized.
Relevant log output
chrome console log
main.66754811.js:2 Uncaught (in promise) Error: Ancestor for kind "ListValue" not found!
at d (main.66754811.js:2:735954)
at T (main.66754811.js:2:725432)
at d (main.66754811.js:2:718244)
at gc.updateAST (main.66754811.js:2:265395)
at 649.ddb22630.chunk.js:1:687272
at 649.ddb22630.chunk.js:1:687555
at j.value (104.66754811.js:2:856086)
at K._deliver (104.66754811.js:2:300181)
at K._deliverQueue (104.66754811.js:2:300287)
at K.fire (104.66754811.js:2:300717)
Additional context
No response
@icanhasjonas I will take a look at this shortly