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
// Defining mutation function
func mutateHook(b *modelgen.ModelBuild) *modelgen.ModelBuild {
return b
}
Running generate creates hundreds of errors following the example in the title for every single resolver I have
/../../../models.go:xx adding resolver method for , nothing matched
/../../../models.go:xx adding resolver method for , nothing matched
/../../../models.go:xx adding resolver method for , nothing matched
/../../../models.go:xx adding resolver method for , nothing matched
nothing actually happens with those errors though. No resolver method is actually added. In fact if I add new resolvers,. I need to add them manually, the generator seems to break.
Removing the plugin generates properly
What did you expect?
For the generator to function as normal and generate resolvers without noisy errors
This discussion was converted from issue #1635 on February 04, 2022 00:53.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
What happened?
When using the modelgen plugin, Generator returns a lot of errors, generates models properly but does not generate resolvers
I copy and paste the code directly from here and even simplify the hook so it does nothing
https://gqlgen.com/recipes/modelgen-hook/
Running generate creates hundreds of errors following the example in the title for every single resolver I have
/../../../models.go:xx adding resolver method for , nothing matched
/../../../models.go:xx adding resolver method for , nothing matched
/../../../models.go:xx adding resolver method for , nothing matched
/../../../models.go:xx adding resolver method for , nothing matched
nothing actually happens with those errors though. No resolver method is actually added. In fact if I add new resolvers,. I need to add them manually, the generator seems to break.
Removing the plugin generates properly
What did you expect?
For the generator to function as normal and generate resolvers without noisy errors
Minimal graphql.schema and models to reproduce
versions
gqlgen version
1.14?go version
1.16?Beta Was this translation helpful? Give feedback.
All reactions