Skip to content

Commit

Permalink
reverse errors and data order in response
Browse files Browse the repository at this point in the history
  • Loading branch information
vetcher committed Oct 4, 2018
1 parent 7833d0c commit 42e1104
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion graphql/response.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@ import (
"github.com/vektah/gqlparser/gqlerror"
)

// Errors are intentionally serialized first based on the advice in
// https://github.com/facebook/graphql/commit/7b40390d48680b15cb93e02d46ac5eb249689876#diff-757cea6edf0288677a9eea4cfc801d87R107
// and https://github.com/facebook/graphql/pull/384
type Response struct {
Data json.RawMessage `json:"data"`
Errors gqlerror.List `json:"errors,omitempty"`
Data json.RawMessage `json:"data"`
Extensions map[string]interface{} `json:"extensions,omitempty"`
}

Expand Down

0 comments on commit 42e1104

Please sign in to comment.