Skip to content

Commit

Permalink
fix: removed schema's _auto_camelcase attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
mak626 committed Jan 12, 2024
1 parent ce1d436 commit 2932f34
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions graphene_directives/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>"]
Expand Down

0 comments on commit 2932f34

Please sign in to comment.