14 lines
391 B
Python
14 lines
391 B
Python
from django.conf import settings
|
|
from django.conf.urls import url
|
|
from django.views.decorators.csrf import csrf_exempt
|
|
|
|
from core.views import PrivateGraphQLView
|
|
|
|
app_name = 'api'
|
|
urlpatterns = [
|
|
url(r'^graphql', csrf_exempt(PrivateGraphQLView.as_view())),
|
|
]
|
|
|
|
if settings.DEBUG:
|
|
urlpatterns += [url(r'^graphiql', csrf_exempt(PrivateGraphQLView.as_view(graphiql=True, pretty=True)))]
|