diff --git a/graphene_directives/schema.py b/graphene_directives/schema.py index e5ac609..b059a91 100644 --- a/graphene_directives/schema.py +++ b/graphene_directives/schema.py @@ -56,7 +56,7 @@ def __init__( auto_camelcase: bool = True, ): self.directives = directives or [] - self._auto_camelcase = auto_camelcase + self.auto_camelcase = auto_camelcase super().__init__( query=query, mutation=mutation, @@ -73,7 +73,7 @@ def field_name_to_type_attribute( Create field name conversion method (from schema name to actual graphene_type attribute name). """ field_names = {} - if self._auto_camelcase: + if self.auto_camelcase: field_names = { to_camel_case(attr_name): attr_name for attr_name in getattr(model._meta, "fields", []) # noqa @@ -86,7 +86,7 @@ def type_attribute_to_field_name(self) -> Callable[[str], str]: """ Create a conversion method to convert from graphene_type attribute name to the schema field name. """ - if self._auto_camelcase: + if self.auto_camelcase: return lambda attr_name: to_camel_case(attr_name) return lambda attr_name: attr_name diff --git a/pyproject.toml b/pyproject.toml index 6d530f2..e3cf032 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "graphene-directives" -version = "0.3.0" +version = "0.3.1" packages = [{include = "graphene_directives"}] description = "Schema Directives implementation for graphene" authors = ["Strollby "]