You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It sounds like the linter is overly strict. Returning interfaces is perfectly valid when you're implementing another interface. (Which this is doing.) By changing the methods (and the interfaces they implement) to structs, you could no longer implement the Resolver interface with anything but the generated resolvers.
Can is ask a question on this issue? Returning Interface I think it’s fine. But Query() and Mutation() always return a new pointer to their resolver implementation for every call. Wouldn’t that mean we would have a lot of objects which needs to be deleted by GC?
What happened?
I just updated to golangci-lint v1.43 today and I'm getting this warning from ireturn:
What did you expect?
Maybe we should stop to return interface in that methods.
Minimal graphql.schema and models to reproduce
versions
gqlgen version
? github.com/99designs/gqlgen v0.14.0go version
? go version go1.17.2 windows/amd64The text was updated successfully, but these errors were encountered: