PedroBern / django-graphql-auth

Django registration and authentication with GraphQL.

Home Page:https://django-graphql-auth.readthedocs.io/en/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Documentation Inaccurate part

roylanmartinez opened this issue · comments

Prerequisites

  • [ x] Is it a bug (documentation bug)?
  • Is it a new feature?
  • Is it a a question?
  • [x ] Can you reproduce the problem?
  • [ x] Are you running the latest version?
  • [x ] Did you check for similar issues?
  • [x ] Did you perform a cursory search?

The documentation states that in order to add additional fields you should add this inside the settings.py file:

REGISTER_MUTATION_FIELDS = {
    "email": "String",
    "username": "String",
    "luck_number": "Int",
}

But it does not work, the proper way to do it is by adding the following code to the GRAPHQL_AUTH variable inside the settings.py file:

GRAPHQL_AUTH = {
    ...
    'REGISTER_MUTATION_FIELDS': {
         "email": "String",
         "username": "String",
         "luck_number": "Int",
    }
    
}

And you should follow this pattern for all the dynamic fields.