Closed
Description
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:
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.