We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
Is your feature request related to a problem? Please describe. Is there a way to add descriptions for arguments?
Describe the solution you'd like A way to add descriptions to arguments, something like this in the graphql_object! macro:
graphql_object!
field items( &executor, #[graphql(description = "first n items")] first: i32, #[graphql(description = "last n items")] last: i32, ) -> FieldResult<Items> { ... }
Or:
#[derive(GraphQLInputObject)] #[graphql(description = "first n items")] type First = i32;
Which is used in the resolver as:
field item(&executor, first: First, last: Last) -> FieldResult<Item> { ... }
Describe alternatives you've considered I have looked into #[derive(GraphQLInputObject)] but that seems only for passing structs as arguments.
#[derive(GraphQLInputObject)]
The text was updated successfully, but these errors were encountered:
I just realised you can do this with doc strings:
field items( &executor, /// first n items first: i32, /// last n items last: i32, ) -> FieldResult<Items> { ... }
Or more generally:
field items( &executor #[doc = "Argument description"] arg_name: ArgType arg_name: ArgType as "Argument description" arg_name = default_value: ArgType as "Argument description" ) -> FieldResult<Items> { ... }
Sorry, something went wrong.
No branches or pull requests
Uh oh!
There was an error while loading. Please reload this page.
Is your feature request related to a problem? Please describe.
Is there a way to add descriptions for arguments?
Describe the solution you'd like
A way to add descriptions to arguments, something like this in the
graphql_object!
macro:Or:
Which is used in the resolver as:
Describe alternatives you've considered
I have looked into
#[derive(GraphQLInputObject)]
but that seems only for passing structs as arguments.The text was updated successfully, but these errors were encountered: