-
Notifications
You must be signed in to change notification settings - Fork 162
Unknow other variant for fragment #373
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
Unknow other variant for fragment #373
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did a very quick read and it looks like the PR is on the right path 👍
Sorry for the small merge conflicts because of #371
I'll try to find time soon for a proper review. Thanks for the PR! |
Hi @tomhoule, I have a doubt. What about doing the same thing for the union/interface types making it the default behaviour. |
I have only a pretty distant memory of what the generated code looks like, but that sounds very reasonable. |
@tomhoule I made a second commit which implements the feature as suggested by @damjack.
In this way it is easy to see the two versions and decide which one to carry on |
Hi @visd0m , I just had a look at both commits, and I think we should have the opt-in option at first (first commit). In general the commit looks good 👍 I'll cut a release now, so we can merge without worrying too much after that and have time to test. |
This reverts commit 20c8e6d.
@tomhoule I reverted the last commit and restore the first changes. |
Yes, we can definitely cut another release as soon as I find some time for graphql-client again, hopefully soon. I'd probably take the opportunity to also change graphql_client_codegen to not depend on syn and quote anymore too. |
@visd0m I changed the main branch for the repo from |
Tries to solve the issue.
Add the option
fragments-other-variant
to allow the generation of anUnkown
"serde other" variant in the Enum generated by fragments.The option can be set as macro attributes or by flag if using the graphql-client-cli.
As default the option is disabled.