Skip to content

Commit

Permalink
adding check kind resolver
Browse files Browse the repository at this point in the history
  • Loading branch information
pugovok committed May 21, 2021
1 parent 0290bcb commit b7dcbfe
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/exec/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,11 @@ func (r *Request) execSelectionSet(ctx context.Context, sels []selected.Selectio

if s.ExtResolver != nil {
if v, ok := s.ExtResolver[t.String()]; ok {
resolver = reflect.NewAt(v.Elem().Type(), unsafe.Pointer(resolver.Elem().UnsafeAddr()))
if resolver.Kind() == reflect.Struct {
resolver = reflect.NewAt(v.Elem().Type(), unsafe.Pointer(resolver.UnsafeAddr()))
} else {
resolver = reflect.NewAt(v.Elem().Type(), unsafe.Pointer(resolver.Elem().UnsafeAddr()))
}
}
}

Expand Down

0 comments on commit b7dcbfe

Please sign in to comment.