mirror of
https://github.com/graphql-python/graphene-django.git
synced 2024-11-10 19:57:15 +03:00
27 lines
651 B
Python
27 lines
651 B
Python
|
from django.urls import path
|
||
|
|
||
|
from graphene.validation import DisableIntrospection
|
||
|
|
||
|
from ..views import GraphQLView
|
||
|
from .schema_view import schema
|
||
|
|
||
|
|
||
|
class View(GraphQLView):
|
||
|
schema = schema
|
||
|
|
||
|
|
||
|
class NoIntrospectionView(View):
|
||
|
validation_rules = (DisableIntrospection,)
|
||
|
|
||
|
|
||
|
class NoIntrospectionViewInherited(NoIntrospectionView):
|
||
|
pass
|
||
|
|
||
|
|
||
|
urlpatterns = [
|
||
|
path("graphql/", View.as_view()),
|
||
|
path("graphql/validation/", View.as_view(validation_rules=(DisableIntrospection,))),
|
||
|
path("graphql/validation/alternative/", NoIntrospectionView.as_view()),
|
||
|
path("graphql/validation/inherited/", NoIntrospectionViewInherited.as_view()),
|
||
|
]
|