PedroBern / django-graphql-auth

Django registration and authentication with GraphQL.
https://django-graphql-auth.readthedocs.io/en/latest/
MIT License
333 stars 105 forks source link

Documentation Inaccurate part #120

Closed roylanmartinez closed 3 years ago

roylanmartinez commented 3 years ago

Prerequisites

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.