Skip to content
This repository has been archived by the owner on Nov 8, 2017. It is now read-only.

Commit

Permalink
Merge pull request #1 from flynn/better-error-handling
Browse files Browse the repository at this point in the history
executor: Improve error handling
  • Loading branch information
jvatic authored Oct 13, 2016
2 parents 3e4ba97 + d40562a commit 2a9f177
Show file tree
Hide file tree
Showing 7 changed files with 150 additions and 427 deletions.
28 changes: 2 additions & 26 deletions abstract_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,19 +355,7 @@ func TestResolveTypeOnInterfaceYieldsUsefulError(t *testing.T) {
}`

expected := &graphql.Result{
Data: map[string]interface{}{
"pets": []interface{}{
map[string]interface{}{
"name": "Odie",
"woofs": bool(true),
},
map[string]interface{}{
"name": "Garfield",
"meows": bool(false),
},
nil,
},
},
Data: nil,
Errors: []gqlerrors.FormattedError{
{
Message: `Runtime Object type "Human" is not a possible type for "Pet".`,
Expand Down Expand Up @@ -473,19 +461,7 @@ func TestResolveTypeOnUnionYieldsUsefulError(t *testing.T) {
}`

expected := &graphql.Result{
Data: map[string]interface{}{
"pets": []interface{}{
map[string]interface{}{
"name": "Odie",
"woofs": bool(true),
},
map[string]interface{}{
"name": "Garfield",
"meows": bool(false),
},
nil,
},
},
Data: nil,
Errors: []gqlerrors.FormattedError{
{
Message: `Runtime Object type "Human" is not a possible type for "Pet".`,
Expand Down
Loading

0 comments on commit 2a9f177

Please sign in to comment.