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
I would like my resolver to expand on an existing struct type, like from another package, when using UseFieldResolvers. To do that, I compose the objects by embedded the base struct inside the resolver struct. However, this doesn't compile because it looks like graphql-go only traverses the first level of fields to find the one that satisfies the schema. This would be helpful so I don't have to implement tedious resolver methods for every field.
This is a fairly crucial topic. Ambiguity should be resolved in the same manner all other issues with schema -> type are resolved, by panicing on mismatch, just like a missing resolver does.
Separating the types, which should really be auto-generated and external to the client code, from the resolvers is an extremely valuable thing.
I would like my resolver to expand on an existing struct type, like from another package, when using
UseFieldResolvers
. To do that, I compose the objects by embedded the base struct inside the resolver struct. However, this doesn't compile because it looks like graphql-go only traverses the first level of fields to find the one that satisfies the schema. This would be helpful so I don't have to implement tedious resolver methods for every field.The text was updated successfully, but these errors were encountered: