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

Add example of custom errors #274

Closed
pavelnikolov opened this issue Oct 17, 2018 · 2 comments · Fixed by #361
Closed

Add example of custom errors #274

pavelnikolov opened this issue Oct 17, 2018 · 2 comments · Fixed by #361

Comments

@pavelnikolov
Copy link
Member

Now that #272 has been merged it would be nice to have an example in the errors package which appears here https://godoc.org/github.com/graph-gophers/graphql-go/errors.
I think that input validation error(s) sounds like a good idea.

@hjf0416
Copy link

hjf0416 commented Aug 5, 2019

what's status for this one? I want to add extensions in my own app but not sure how to

@pavelnikolov
Copy link
Member Author

The library supports it, we do not have a good example yet. The unit test is descriptive enough. PRs to improve the documentation or add an example are welcome. All errors that implement this interface:

type ResolverError interface {
	error
	Extensions() map[string]interface{}
}

will return the extensions in the error output.

@pavelnikolov pavelnikolov moved this from In progress to Done in Roadmap Mar 16, 2021
@pavelnikolov pavelnikolov moved this from Done to In progress in Roadmap Mar 16, 2021
@pavelnikolov pavelnikolov moved this from In progress to Done in Roadmap Mar 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Roadmap
  
Done
Development

Successfully merging a pull request may close this issue.

2 participants