Skip to content

Commit

Permalink
Fix panic when resolver is not a pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyghita authored and neelance committed May 9, 2017
1 parent d0df6d8 commit 00c4c57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/exec/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ func (r *Request) execSelectionSet(ctx context.Context, sels []selected.Selectio
t, nonNull := unwrapNonNull(typ)
switch t := t.(type) {
case *schema.Object, *schema.Interface, *schema.Union:
if resolver.IsNil() {
if resolver.Kind() == reflect.Ptr && resolver.IsNil() {
if nonNull {
panic(errors.Errorf("got nil for non-null %q", t))
}
Expand Down

0 comments on commit 00c4c57

Please sign in to comment.