-
Notifications
You must be signed in to change notification settings - Fork 490
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
More info on errors #60
Comments
See #49. I think the same solution should be possible in your case. If yes, then I should add some documentation to the readme since this question came up several times now. |
Oops, I referenced the wrong issue in the commit. Reopening. |
@EmperorEarth Any response to my comment above? |
Not to hijack the issue, but the addition of query paths on errors to the specification seems near. See: graphql/graphql-spec#230 At first I was thinking of adding the |
@neelance, if I understand it right, it doesn't solve what I'm trying to do because the param is still One pattern I use in my code is that I log errors once and as late as possible (as high up as possible). Most functions, if they error out, will just wrap them a stack trace and return them (Cheney's Given the highly nested nature of graphql resolvers, I want them to simply wrap and return any errors without logging them. Instead, I'd like to aggregate the raw errors at the root graphql handler and log/massage them there. Right now, what I get is a slice of minimally helpful error As a basic example, as I'm rapidly writing code, sometimes I forget to check I guess what I'm looking for is an API to plug into the aggregated, raw slice of errors, right before they are returned to clients, where I can log/massage any/all errors. |
To me this still sounds like you need the same solution as #49. Take the list of errors returned by |
Adding an http example for graph-gophers#60 Left to do: - [ ] clean up the schema so its only in one place
Adds the simple mutation for graph-gophers#60 Left to do: [ ] add an http based example
I've been using Dave Cheney's errors pkg to add stack traces to all my errors. In dev, when I'm testing queries in graphiql/my app, I like to return the error directly in the response. I was wondering if there was any way to return the
%+v
version of errors back instead of the%s
version, because right now, I'm not getting the line numbers of various errors and the rest of the stack trace.The text was updated successfully, but these errors were encountered: