americanexpress/nodes

Add extensions and path to error.java

Closed this issue · 1 comments

According to the graph ql spec , the error object follows the following format .
https://facebook.github.io/graphql/June2018/#sec-Errors

{
"errors": [
{
"message": "Name for character with ID 1002 could not be fetched.",
"locations": [ { "line": 6, "column": 7 } ],
"path": [ "hero", "heroFriends", 1, "name" ],
"extensions": {
"code": "CAN_NOT_FETCH_BY_ID",
"timestamp": "Fri Feb 9 14:33:09 UTC 2018"
}
}
]
}

Hi @bpillai closing this as a duplicate of #22
Unfortunately I have not had the time to implement this yet but would be more than happy to accept a PR for it!