Skip to content

Instantly share code, notes, and snippets.

@thibaudlabat
thibaudlabat / urls.py
Created July 26, 2022 10:53
graphene-django query cost analysis / complexity limits
from django.conf.urls import url
from django.contrib import admin
from graphene_django.views import GraphQLView
from django.views.decorators.csrf import csrf_exempt
from graphql.backend.core import GraphQLCoreBackend
"""
This piece of code implements complexity limits for a graphene-django API.