Some stuff that i used when developing with django
Project description
Introduction
Django app that expose a graphql schema as well as a graphiql interface.
User
Installation
pip install django-app-graphql
Configuration
in INSTALLED_APPS
you need to add:
'graphene_django',
'django_filters',
After all your apps you need to use this app (this is important otherwise some models won't be detected at all!):
'django_app_graphql',
The first thing you need to do is determine if you want your grpahql server setupped using graphene
or uysing ariadne
.
In settings, write:
DJANGO_APP_GRAPHQL = {
"BACKEND_TYPE": "ariadne|graphene"
}
and select either ariadne or graphene.
Finally, in urls.py
of the entire project add the following line:
urlpatterns = [
...
path("graphqls/", include("django_app_graphql.urls")),
...
]
You have chosen graphene
The app needs to be deploy for last because otherwise it cannot detect all the Django models and their types.
You also need to configure the authentication proces. Hence you need t add "AUTHENTICATION_BACKENDS" in the settings.py
:
AUTHENTICATION_BACKENDS = [
"graphql_jwt.backends.JSONWebTokenBackend",
"django.contrib.auth.backends.ModelBackend"
]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Hashes for django_koldar_utils-1.18.12-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3310d3619fe314fdd1cb9176dbefb865bdccd8d70109416419cfec8ed1ad1428 |
|
MD5 | 764718d3d65e64b0f77e2a8b24b3135a |
|
BLAKE2b-256 | 641b1f5c29c6d9ccbe189e404ec469749289cf77e68b23967b2ab19a4236261d |