Skip to content

Commit

Permalink
fix: prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
superlevure committed Oct 24, 2022
1 parent 94c608c commit ecd17f5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion graphene/types/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ def add_prefix_to_field_name(self, name):
+ "_"
+ name
)
return self.get_name(self.type_name_prefix + "_" + name)
return self.get_name(self.type_name_prefix + name)
return self.get_name(name)


Expand Down
6 changes: 3 additions & 3 deletions graphene/types/tests/test_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ def test_schema_type_name_prefix_camelcase_disabled():
== dedent(
"""
type Query {
MyPrefix_inner: MyPrefixMyType
MyPrefixinner: MyPrefixMyType
}
type MyPrefixMyType {
Expand Down Expand Up @@ -274,15 +274,15 @@ def test_schema_type_name_prefix_camelcase_disabled():
}
type Mutation {
MyPrefix_create_user(name: String): MyPrefixCreateUser
MyPrefixcreate_user(name: String): MyPrefixCreateUser
}
type MyPrefixCreateUser {
name: String
}
type Subscription {
MyPrefix_count_to_ten: Int
MyPrefixcount_to_ten: Int
}
"""
).strip()
Expand Down

0 comments on commit ecd17f5

Please sign in to comment.