-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
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
there are no resolvers generated for input #1948
Comments
created a PR for this issue , can you accept it pls? |
Hey @FanFani4, I am facing the same issue as you. This has led to the following issue in my project |
This is very strange. @FanFani4 I can suppose the problem is: autobind:
- "github.com/FanFani4/gqlgen-input-bug/domain" Can you please try to generate without these lines? |
hi @frederikhors , without binding models it is generating everything fine in graph/model/model_gen.go - this can be reproduced with autobind and manual binding |
@Omkarz7 thx, but it is not only about enums , i changed github.com/FanFani4/gqlgen-input-bug TestInput.role in schema to string and in model to float and the behavior is exactly the same |
plugin/resolvergen/resolver.go resolvergen is iterating only through objects only , i added inputs to be iterated as well and resolvers for inputs was generated fine |
@FanFani4 I am not talking about enums, I am talking about TestInput.id, change it to Int and check if that works
I got around the issue by accepting id as different parameter in the mutation like this: And now I am wondering that we might be talking about two different issues. |
yes, i am talking about the case when fields of an input have different types in schema and binded model |
hi @frederikhors, any news on this issue ? |
Please don't ask for ETA. |
hi @mojtabacazi , yes it is. you can try to add this line in your go.mod and try to regenerate the code. just don't forget to remove it when its fixed
|
What happened?
not generating resolvers for input types ( even with force resolver from gqlgen.yml or @GoModel directive )
What did you expect?
same behavior as for types
Minimal graphql.schema and models to reproduce
https://github.com/FanFani4/gqlgen-input-bug
versions
gqlgen version
?go version
?related issues and discussions
#1307
#1823
The text was updated successfully, but these errors were encountered: