8000 Private fields and `db_field` arg’ · Issue #153 · graphql-python/graphene-mongo · GitHub
[go: up one dir, main page]

Skip to content
Private fields and db_field arg’ #153
Open
@jul-grnx

Description

@jul-grnx

Hello,

I’m playing with private fields with MongoEngine and Graphene-Mongo like this:

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0