Fork me on GitHub

Is it expected that lacinia returns only the first error when parsing inputs?


It's not very exhaustive; generally, Antlr throws an exception when parsing, and that's as far as we can take it, and we convert the exception (with its location) to an error map.


I mean argument inputs for mutations, is that about it you are talking about?


No, I was talking about the Antlr parse step.


That is for parsing the schema right?


But, again, validating argument inputs results in exceptions that are cast, caught, and converted. That usually means the first error aborts the mission, so other latent errors are not caught.


Antlr is used to parse the GraphQL query.


It's a pretty standard Java parsing library that generates a tokenizer and recognizer; efficient and powerful.


Parsing GraphQL schema definition is optional; you can use it, but it just generates Clojure data that's fed into the actual compiler. It's a more recent addition, mostly Lacinia uses a Clojure data definition read from an EDN file.


I'm using the edn file. I remembered the schema parsing from when I first heard about lacinia and looking the source. I used graphql on elixir with absinthe and iirc it returned all errors, so I was sort of expecting that.