How to trigger resolver generation on parameterized field #1934
Replies: 3 comments
-
Hey, did you solve it somehow? |
Beta Was this translation helpful? Give feedback.
-
Perhaps you could try the just merged #1725 if it helps with your case. Otherwise it's not quite clear what your environment is, e.g. there's no |
Beta Was this translation helpful? Give feedback.
-
Actually I found a fix to this: You can edit the generated App go struct (by moving it into a separate file) and remove the "time_range" field. When you run the generate command again, a getter method will be generated for the tim_range field which gets passed the correct arguments. |
Beta Was this translation helpful? Give feedback.
-
What happened?
the following schema:
does not generate a resolver for
time_range
by default. How am i supposed to access thestart
andstop
parameters ?I like my model to be generated, even if I know i can force the resolver generation through a graphql directive or the
qglgen.yml
it is quite cumbersome when you have a few of them.What did you expect?
The resolver to be generated by default on each parameterized graphql field. Or one line of configuration to do that.
BTW: the yaml configuration is not documented anymore on the website, seems to have been moved away with the FAQ
versions
gqlgen version
0.13.0go version
1.15.7Beta Was this translation helpful? Give feedback.
All reactions