Fork me on GitHub
#graphql
<
2018-04-11
>
mynomoto20:04:48

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

hlship20:04:44

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.

mynomoto20:04:40

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

hlship20:04:56

No, I was talking about the Antlr parse step.

mynomoto20:04:20

That is for parsing the schema right?

hlship20:04:40

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.

hlship20:04:09

Antlr is used to parse the GraphQL query.

hlship20:04:59

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

hlship20:04:00

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.

mynomoto20:04:01

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.