You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today when there are mistakes in a schema, all of the error messages are combined into one big message and raised in an Absinthe.Schema.Error. The diagnostics emitted by Elixir point to the user's Schema module. It's not too hard to follow that and find where the actual errors are coming from but it is a little inconvenient.
It would be nice if the diagnostics included the locations of where those errors originated. Tools built to read those diagnostics would be more beneficial without needing to do any special parsing for errors emitted by Absinthe. It could enable something like this in the editor:
We can get that to happen if we loop over and IO.warn/2 those errors before raising. Something like the following code. I'm unfamiliar with a lot of the internal Absinthe code so this snippet is probably incomplete.
Is this desired behavior? If so would we want to leave the raised error message as it is or change it to something shorter like "There were problems with your schema. View the previously emitted warnings"?
The text was updated successfully, but these errors were encountered:
Hello!
Today when there are mistakes in a schema, all of the error messages are combined into one big message and raised in an Absinthe.Schema.Error. The diagnostics emitted by Elixir point to the user's Schema module. It's not too hard to follow that and find where the actual errors are coming from but it is a little inconvenient.
It would be nice if the diagnostics included the locations of where those errors originated. Tools built to read those diagnostics would be more beneficial without needing to do any special parsing for errors emitted by Absinthe. It could enable something like this in the editor:
We can get that to happen if we loop over and
IO.warn/2
those errors before raising. Something like the following code. I'm unfamiliar with a lot of the internal Absinthe code so this snippet is probably incomplete.absinthe/lib/absinthe/schema.ex
Lines 391 to 392 in 77d415d
Is this desired behavior? If so would we want to leave the raised error message as it is or change it to something shorter like "There were problems with your schema. View the previously emitted warnings"?
The text was updated successfully, but these errors were encountered: