americanexpress / nodes

A GraphQL JVM Client - Java, Kotlin, Scala, etc.
Apache License 2.0
307 stars 70 forks source link

Add extensions and path to error.java #61

Closed bpillai closed 5 years ago

bpillai commented 5 years ago

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" } } ] }

chemdrew commented 5 years ago

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!