Skip to content

Commit

Permalink
Upgrade heck dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
TethysSvensson committed Dec 20, 2021
1 parent fd5dc3d commit fcda0da
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion graphql_client_codegen/Cargo.toml
Expand Up @@ -10,7 +10,7 @@ edition = "2018"
[dependencies]
graphql-introspection-query = { version = "0.2.0", path = "../graphql-introspection-query" }
graphql-parser = "^0.2"
heck = "0.3"
heck = "0.4.0"
lazy_static = "1.3"
proc-macro2 = { version = "^1.0", features = [] }
quote = "^1.0"
Expand Down
2 changes: 1 addition & 1 deletion graphql_client_codegen/src/codegen.rs
Expand Up @@ -9,7 +9,7 @@ use crate::{
type_qualifiers::GraphqlTypeQualifier,
GeneralError, GraphQLClientCodegenOptions,
};
use heck::SnakeCase;
use heck::ToSnakeCase;
use proc_macro2::{Ident, Span, TokenStream};
use quote::quote;
use selection::*;
Expand Down
2 changes: 1 addition & 1 deletion graphql_client_codegen/src/codegen/inputs.rs
Expand Up @@ -4,7 +4,7 @@ use crate::{
query::{BoundQuery, UsedTypes},
schema::input_is_recursive_without_indirection,
};
use heck::SnakeCase;
use heck::ToSnakeCase;
use proc_macro2::{Ident, Span, TokenStream};
use quote::quote;

Expand Down
4 changes: 2 additions & 2 deletions graphql_client_codegen/src/normalization.rs
@@ -1,4 +1,4 @@
use heck::CamelCase;
use heck::ToUpperCamelCase;
use std::borrow::Cow;

/// Normalization conventions available for generated code.
Expand All @@ -14,7 +14,7 @@ impl Normalization {
fn camel_case(self, name: &str) -> Cow<'_, str> {
match self {
Self::None => name.into(),
Self::Rust => name.to_camel_case().into(),
Self::Rust => name.to_upper_camel_case().into(),
}
}

Expand Down
2 changes: 1 addition & 1 deletion graphql_client_codegen/src/query/fragments.rs
Expand Up @@ -11,7 +11,7 @@ pub(crate) struct ResolvedFragment {

impl ResolvedFragment {
pub(super) fn to_path_segment(&self) -> String {
self.name.to_camel_case()
self.name.to_upper_camel_case()
}
}

Expand Down
2 changes: 1 addition & 1 deletion graphql_client_codegen/src/query/operations.rs
Expand Up @@ -18,6 +18,6 @@ pub(crate) struct ResolvedOperation {

impl ResolvedOperation {
pub(crate) fn to_path_segment(&self) -> String {
self.name.to_camel_case()
self.name.to_upper_camel_case()
}
}
8 changes: 4 additions & 4 deletions graphql_client_codegen/src/query/selection.rs
Expand Up @@ -3,7 +3,7 @@ use super::{
UsedTypes,
};
use crate::schema::{Schema, StoredField, StoredFieldId, TypeId};
use heck::CamelCase;
use heck::ToUpperCamelCase;

/// This checks that the `on` clause on fragment spreads and inline fragments
/// are valid in their context.
Expand Down Expand Up @@ -226,13 +226,13 @@ impl Selection {
Selection::Field(field) => field
.alias
.as_ref()
.map(|alias| alias.to_camel_case())
.map(|alias| alias.to_upper_camel_case())
.unwrap_or_else(move || {
query.schema.get_field(field.field_id).name.to_camel_case()
query.schema.get_field(field.field_id).name.to_upper_camel_case()
}),
Selection::InlineFragment(inline_fragment) => format!(
"On{}",
inline_fragment.type_id.name(query.schema).to_camel_case()
inline_fragment.type_id.name(query.schema).to_upper_camel_case()
),
other => unreachable!("{:?} in to_path_segment", other),
}
Expand Down

0 comments on commit fcda0da

Please sign in to comment.