graphene/examples/cookbook_django/cookbook/urls.py

13 lines
402 B
Python
Raw Normal View History

2016-01-02 23:19:15 +03:00
from django.conf.urls import include, url
from django.contrib import admin
from django.views.decorators.csrf import csrf_exempt
from cookbook.schema import schema
2016-01-02 23:19:15 +03:00
from graphene.contrib.django.views import GraphQLView
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^graphql', csrf_exempt(GraphQLView.as_view(schema=schema))),
url(r'^graphiql', include('django_graphiql.urls')),
]