Currently the library allows field names to be overridden using the graphql reflect tag. This in turn allows for case-sensitive resolver names and resolvers with significant (even leading) _ character in the name. However, it is not possible to achieve the same with methods, especially for leading underscore. To fix this, the library needs to allow func fields, which behave exactly like method resolvers without the receiver. This would allow, for example:
Currently the library allows field names to be overridden using the
graphql
reflect tag. This in turn allows for case-sensitive resolver names and resolvers with significant (even leading)_
character in the name. However, it is not possible to achieve the same with methods, especially for leading underscore. To fix this, the library needs to allow func fields, which behave exactly like method resolvers without the receiver. This would allow, for example:to be resolved by:
Then the actual resolver instance might look like this: