{"action":"created","issue":{"url":"https://api.github.com/repos/kadirahq/graphql-errors/issues/7","repository_url":"https://api.github.com/repos/kadirahq/graphql-errors","labels_url":"https://api.github.com/repos/kadirahq/graphql-errors/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/kadirahq/graphql-errors/issues/7/comments","events_url":"https://api.github.com/repos/kadirahq/graphql-errors/issues/7/events","html_url":"https://github.com/kadirahq/graphql-errors/issues/7","id":167090347,"number":7,"title":"Custom fields","user":{"login":"brunolemos","id":619186,"avatar_url":"https://avatars.githubusercontent.com/u/619186?v=3","gravatar_id":"","url":"https://api.github.com/users/brunolemos","html_url":"https://github.com/brunolemos","followers_url":"https://api.github.com/users/brunolemos/followers","following_url":"https://api.github.com/users/brunolemos/following{/other_user}","gists_url":"https://api.github.com/users/brunolemos/gists{/gist_id}","starred_url":"https://api.github.com/users/brunolemos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brunolemos/subscriptions","organizations_url":"https://api.github.com/users/brunolemos/orgs","repos_url":"https://api.github.com/users/brunolemos/repos","events_url":"https://api.github.com/users/brunolemos/events{/privacy}","received_events_url":"https://api.github.com/users/brunolemos/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-22T17:09:52Z","updated_at":"2016-07-22T17:43:03Z","closed_at":"2016-07-22T17:43:03Z","body":"How is the recommended approach to return custom fields on graphql errors?\r\nFor example, I'd like it to be something like this:\r\n\r\n```\r\n{\r\n  \"data\": {\r\n    \"users\": null\r\n  },\r\n  \"errors\": [\r\n    {\r\n      \"code\": \"TEST0001,\r\n      \"message\": \"Test error\"\r\n    }\r\n  ]\r\n}\r\n```\r\n\r\ninstead of the default format that only has `message` and  `locations` fields."},"comment":{"url":"https://api.github.com/repos/kadirahq/graphql-errors/issues/comments/234608700","html_url":"https://github.com/kadirahq/graphql-errors/issues/7#issuecomment-234608700","issue_url":"https://api.github.com/repos/kadirahq/graphql-errors/issues/7","id":234608700,"user":{"login":"brunolemos","id":619186,"avatar_url":"https://avatars.githubusercontent.com/u/619186?v=3","gravatar_id":"","url":"https://api.github.com/users/brunolemos","html_url":"https://github.com/brunolemos","followers_url":"https://api.github.com/users/brunolemos/followers","following_url":"https://api.github.com/users/brunolemos/following{/other_user}","gists_url":"https://api.github.com/users/brunolemos/gists{/gist_id}","starred_url":"https://api.github.com/users/brunolemos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brunolemos/subscriptions","organizations_url":"https://api.github.com/users/brunolemos/orgs","repos_url":"https://api.github.com/users/brunolemos/repos","events_url":"https://api.github.com/users/brunolemos/events{/privacy}","received_events_url":"https://api.github.com/users/brunolemos/received_events","type":"User","site_admin":false},"created_at":"2016-07-22T17:43:03Z","updated_at":"2016-07-22T17:43:03Z","body":"Got it, I had to set the graphqlHTTP's `formatError` option instead of the graphql-errors error handler."}}
{"actor":{"display_login":"brunolemos"}}