We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
For every result I want to execute a postconstruct method
func PostConstruct(v interface{}, ctx context.Context) error { c, ok := v.(interface { PostConstruct(ctx context.Context) error }) if ok { return c.PostConstruct(ctx) } return nil }
Because I construct resolver simply by &myResolver{value:v}, but when I want to use exists resolver
&myResolver{value:v}
type myResolver struct{ v MyValue *CommonResolver }
I need to init the *CommonResolver after this resolver has created. So, I need a hook to postconstruct after every field has resolved.
*CommonResolver
One of my init look like this
func (self *myResolver) PostConstruct(ctx context.Context)(err error) { if self.ctx == nil { self.ctx,err = MustMyContextFrom(ctx) } if self.CommonResolver == nil { self.CommonResolver = &CommonResolver{Value: self.item} } return }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
For every result I want to execute a postconstruct method
Because I construct resolver simply by
&myResolver{value:v}
, but when I want to use exists resolverI need to init the
*CommonResolver
after this resolver has created. So, I need a hook to postconstruct after every field has resolved.One of my init look like this
The text was updated successfully, but these errors were encountered: