Open
Description
My graphql scheme contains enums with capital letters values and graphql-client cli generates such code:
#[derive(Eq, PartialEq)]
pub enum PagesSortType {
#[doc = ""]
ID_ASC,
#[doc = ""]
ID_DESC,
#[doc = ""]
MODIFIED_AT_ASC,
#[doc = ""]
MODIFIED_AT_DESC,
Other(String),
}
Rust compiler throws warnings:
warning: variant `MODIFIED_AT_DESC` should have an upper camel case name
--> src/services/pages.rs:417:9
|
417 | MODIFIED_AT_DESC,
| ^^^^^^^^^^^^^^^^ help: convert the identifier to upper camel case: `ModifiedAtDesc`
Perhaps it’s worth adding an #[allow(non_camel_case_types)]
attribute for all enums or making it possible to specify which attributes you want to add yourself via cli argument --variables-attributes
for example.