{"action":"created","issue":{"url":"https://api.github.com/repos/vektah/gqlgen/issues/186","repository_url":"https://api.github.com/repos/vektah/gqlgen","labels_url":"https://api.github.com/repos/vektah/gqlgen/issues/186/labels{/name}","comments_url":"https://api.github.com/repos/vektah/gqlgen/issues/186/comments","events_url":"https://api.github.com/repos/vektah/gqlgen/issues/186/events","html_url":"https://github.com/vektah/gqlgen/pull/186","id":340628412,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAwOTkzODc4","number":186,"title":"Error redux","user":{"login":"vektah","id":2247982,"node_id":"MDQ6VXNlcjIyNDc5ODI=","avatar_url":"https://avatars0.githubusercontent.com/u/2247982?v=4","gravatar_id":"","url":"https://api.github.com/users/vektah","html_url":"https://github.com/vektah","followers_url":"https://api.github.com/users/vektah/followers","following_url":"https://api.github.com/users/vektah/following{/other_user}","gists_url":"https://api.github.com/users/vektah/gists{/gist_id}","starred_url":"https://api.github.com/users/vektah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vektah/subscriptions","organizations_url":"https://api.github.com/users/vektah/orgs","repos_url":"https://api.github.com/users/vektah/repos","events_url":"https://api.github.com/users/vektah/events{/privacy}","received_events_url":"https://api.github.com/users/vektah/received_events","type":"User","site_admin":false},"labels":[{"id":987167861,"node_id":"MDU6TGFiZWw5ODcxNjc4NjE=","url":"https://api.github.com/repos/vektah/gqlgen/labels/BC%20break","name":"BC break","color":"e95f2b","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-07-12T13:02:39Z","updated_at":"2018-07-13T04:52:28Z","closed_at":null,"author_association":"OWNER","pull_request":{"url":"https://api.github.com/repos/vektah/gqlgen/pulls/186","html_url":"https://github.com/vektah/gqlgen/pull/186","diff_url":"https://github.com/vektah/gqlgen/pull/186.diff","patch_url":"https://github.com/vektah/gqlgen/pull/186.patch"},"body":"I set out to document the current state of errors, ended up rewriting them instead. :worried: \r\n\r\nThe old ErrorPresenter took an `error` and returned an `error`, but really it was returning the json encodable response, from that point backward its never treated as an error, just a part of the response.\r\n\r\nI've also added support for Error extensions, which using the default presenter can be set by returning an error that meets the `ExtendedError` interface (having an `Extensions()` method).\r\n\r\nI've also added support to return multiple errors by calling:\r\n```go\r\ngraphql.AddError(ctx, err)\r\ngraphql.AddErrorf(ctx, \"boom\")\r\ngraphql.AddGraphqlError(ctx, &graphql.Error{\r\n   Message: \"Totally customizable in resolver method errors\",\r\n})\r\n```\r\n\r\n[Check the docs](https://github.com/vektah/gqlgen/blob/error-redux/docs/content/reference/errors.md)\r\n\r\nSupersedes #177\r\nFixes #174\r\nFixes #141\r\n"},"comment":{"url":"https://api.github.com/repos/vektah/gqlgen/issues/comments/404724958","html_url":"https://github.com/vektah/gqlgen/pull/186#issuecomment-404724958","issue_url":"https://api.github.com/repos/vektah/gqlgen/issues/186","id":404724958,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNDcyNDk1OA==","user":{"login":"andrewmunro","id":1107388,"node_id":"MDQ6VXNlcjExMDczODg=","avatar_url":"https://avatars1.githubusercontent.com/u/1107388?v=4","gravatar_id":"","url":"https://api.github.com/users/andrewmunro","html_url":"https://github.com/andrewmunro","followers_url":"https://api.github.com/users/andrewmunro/followers","following_url":"https://api.github.com/users/andrewmunro/following{/other_user}","gists_url":"https://api.github.com/users/andrewmunro/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewmunro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewmunro/subscriptions","organizations_url":"https://api.github.com/users/andrewmunro/orgs","repos_url":"https://api.github.com/users/andrewmunro/repos","events_url":"https://api.github.com/users/andrewmunro/events{/privacy}","received_events_url":"https://api.github.com/users/andrewmunro/received_events","type":"User","site_admin":false},"created_at":"2018-07-13T04:52:28Z","updated_at":"2018-07-13T04:52:28Z","author_association":"NONE","body":"Much more flexible approach! 🎉 \r\n\r\nMight want to add a response payload or ordering of multiple errors to the documentation as it might not be clear?"}}
{"actor":{"display_login":"andrewmunro"}}