Replies: 1 comment
-
I do it in this strange way: var re = regexp.MustCompile(`input: \w+ (.*)`)
match := re.FindStringSubmatch(e.Error())
fmt.Println(match[1]) 😳 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What happened?
Errors of a query are displayed as following even when using custom ErrorPresenter:
We can see
input: signup
prefix.The error returned in resolvers is a simple error:
errors.New("existed users")
What did you expect?
I want to display ONLY the message part.
This behavior is occurred by https://github.com/vektah/gqlparser/blob/master/gqlerror/error.go#L40 And we cannot change this error format even when using ErrorPresenter. Is that expected?
versions
gqlgen version
? 0.13.0go version
? 1.16.2Beta Was this translation helpful? Give feedback.
All reactions