diff --git a/graphql.go b/graphql.go index 05c29b7..b4c647c 100644 --- a/graphql.go +++ b/graphql.go @@ -250,13 +250,18 @@ func ImmediatelyCloseReqBody() ClientOption { type ClientOption func(*Client) type graphErr struct { - Message string + Message string + ErrorExtensions map[string]interface{} `json:"extensions"` } func (e graphErr) Error() string { return "graphql: " + e.Message } +func (e graphErr) Extensions() map[string]interface{} { + return e.ErrorExtensions +} + type graphResponse struct { Data interface{} Errors []graphErr