graphql-python / graphql-python/graphene-mongo
Private fields and `db_field` arg’
- Dominant language
- Python
- Stars
- 287
- Forks
- 111
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
I’m playing with private fields with MongoEngine and Graphene-Mongo like this:
```python
class MyDocument(Document):
# define a “private” field (with underscore)
# but set the database field without the underscore:
_private = StringField(db_field="private")
class MyType(MongoengineObjectType):
class Meta:
model = MyDocument
```
And… the generated `MyType` has a field named `Private` (not `private`).
That make me ask 2 questions:
* It seems the conversion snake_case to camelCase does not make any special case for leading underscore: is it normal?
* Why not consider the database field?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.