-
-
Notifications
You must be signed in to change notification settings - Fork 507
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Description of the feature
When using async_graphql::Interface
, there seems to be no way to define the arg name in sdl schema.
In the below example, I have an argument called where
, but where is a keyword in Rust, I have to change it to another name, but I still want my users use where
when querying.
e.g.
#[derive(Interface)]
#[graphql(
field(name = "value_c", ty = "i32",
arg(name = "where", ty = "i32")
)
)]
enum MyInterface {
TypeA(TypeA)
}
I would like to suggest having the below functionality.
#[derive(Interface)]
#[graphql(
field(name = "value_c", ty = "i32",
arg(name = "filter", graphql(name = "where"), ty = "i32")
)
)]
enum MyInterface {
TypeA(TypeA)
}
or
#[derive(Interface)]
#[graphql(
field(name = "value_c", ty = "i32",
arg(name = "filter", graphql_name = "where", ty = "i32")
)
)]
enum MyInterface {
TypeA(TypeA)
}
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request