diff --git a/internal/exec/exec.go b/internal/exec/exec.go index 00b35937366..6b702df01c8 100644 --- a/internal/exec/exec.go +++ b/internal/exec/exec.go @@ -212,7 +212,11 @@ func (b *execBuilder) makeObjectExec(typeName string, fields map[string]*schema. for name, f := range fields { methodIndex := findMethod(resolverType, name) if methodIndex == -1 { - return nil, fmt.Errorf("%s does not resolve %q: missing method for field %q", resolverType, typeName, name) + hint := "" + if findMethod(reflect.PtrTo(resolverType), name) != -1 { + hint = " (hint: the method exists on the pointer type)" + } + return nil, fmt.Errorf("%s does not resolve %q: missing method for field %q%s", resolverType, typeName, name, hint) } m := resolverType.Method(methodIndex)