django-graph-auth

django-graph-auth is a Django application which provides simple mutations and queries for managing users with GraphQL.


Keywords
django, graphql, api, authentication, jwt
License
MIT
Install
pip install django-graph-auth==0.3.1

Documentation

django-graph-auth

django-graph-auth is a Django application which provides simple mutations and queries for managing users with GraphQL. It can register users, log in, reset users, and expose JSON web tokens.

Documentation can be found on GitHub.

Requirements

This has only been tested with:

  • Python: 3.5
  • Django: 1.10

Setup

Install from pip:

pip install django-graph-auth

and then add it to your installed apps:

INSTALLED_APPS = (
    ...
    'graph_auth',
    ...
)

You will also need to edit your base schema to import the mutations and queries, like this:

import graphene
from graphene import relay, ObjectType

import graph_auth.schema

class Query(graph_auth.schema.Query, ObjectType):
    node = relay.Node.Field()

class Mutation(graph_auth.schema.Mutation, ObjectType):
    pass

schema = graphene.Schema(query=Query, mutation=Mutation)

Credits

django-graph-auth was created by Morgante Pell (@morgante). It is based on django-rest-auth.