Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Response.Errors in DispatchError function is not PresentedError. #2234

Closed
oikyn opened this issue Jun 10, 2022 · 0 comments
Closed

Response.Errors in DispatchError function is not PresentedError. #2234

oikyn opened this issue Jun 10, 2022 · 0 comments

Comments

@oikyn
Copy link
Contributor

oikyn commented Jun 10, 2022

What happened?

Response.Errors in DispatchError function is not *gqlerror.Error handled by graphql.ErrorPresenterFunc .

resp := &graphql.Response{
Errors: list,
}

What did you expect?

I expected the following.

resp := &graphql.Response{
    Errors: graphql.GetErrors(ctx),
}

Because we expect to show the following as Errors in the response.

for _, gErr := range list {
graphql.AddError(ctx, gErr)
}

versions

  • go run github.com/99designs/gqlgen version?
    • v0.17.9
  • go version?
    • go version go1.18.2 darwin/amd64
oikyn added a commit to oikyn/gqlgen that referenced this issue Jun 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant