-
-
Notifications
You must be signed in to change notification settings - Fork 433
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
Automatically generate an input name with a suffix #1117
Comments
This is definitely a good idea, but now that we already have an |
The problem is that If I do: // ...
#[derive(SimpleObject, InputObject)]
#[graphql(input_name = concat!($name, "Input")]
pub struct $name {
// ...
} This will not compile as |
I opened a PR to add this change, it ended up being really trivial: #1119 |
Hi!
Would it be possible, when using both
SimpleObject
andInputObject
on the same struct, or bothUnion
andOneofObject
, to make the input type automatically suffixed?For instance, the following code:
Would now compile just like we wrote:
This would be immensely helpful in macros, especially as
#[graphql(input_name = "...")]
doesn't accept variables.What do you think of this?
The text was updated successfully, but these errors were encountered: