diff --git a/Cargo.lock b/Cargo.lock index 5b1752c..7a11ce4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -132,7 +132,7 @@ dependencies = [ [[package]] name = "async-graphql-reverse" -version = "0.5.0" +version = "0.6.0" dependencies = [ "anyhow", "async-graphql", diff --git a/examples/simple/input/reverse.toml b/examples/simple/input/reverse.toml index 92248fe..cd62745 100644 --- a/examples/simple/input/reverse.toml +++ b/examples/simple/input/reverse.toml @@ -1,14 +1,11 @@ default_data_source_fetch_method = "ctx.data_unchecked::()" +enum_rename_items = "camelCase" # custom_member_types=["CustomPrimitiveType"] [using] data_source = "use crate::datasource::DataSource" -[default_setting] -enum_rename_items = "camelCase" - - [[enum]] target_enum = "UserType" rename_items = "UPPERCASE" diff --git a/examples/simple/output/mod.rs b/examples/simple/output/mod.rs index 24fb31f..ee46ee5 100644 --- a/examples/simple/output/mod.rs +++ b/examples/simple/output/mod.rs @@ -1,4 +1,10 @@ -#[allow(dead_code, clippy::clone_on_copy, clippy::too_many_arguments)] +#[allow( + dead_code, + non_camel_case_types, + clippy::upper_case_acronyms, + clippy::clone_on_copy, + clippy::too_many_arguments +)] // DO NOT EDIT THIS FILE // This file was generated by https://github.com/tacogips/async-graphql-reverse mod objects; diff --git a/src/render/interfaces.rs b/src/render/interfaces.rs index 4c11594..5284ef1 100644 --- a/src/render/interfaces.rs +++ b/src/render/interfaces.rs @@ -112,7 +112,7 @@ fn interface_token( .to_string() .replace(" ", ""); - let field_token = quote! {field(name = #field_name, type = #field_type )}; + let field_token = quote! {field(name = #field_name, ty = #field_type )}; interface_field_tokens.push(field_token); let mut dependencies = dependency(&interface_field.typ, schema, &context)?;