mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-07-11 00:32:24 +03:00
Switch from re_path to path.
The DEFAULT_GRAPHQL_URL had to change because it doesn't take into account the APPEND_SLASH setting from within Django.
This commit is contained in:
parent
ae01931ad3
commit
c2818c85e0
|
@ -55,7 +55,7 @@ from graphene_django.views import GraphQLView
|
|||
|
||||
urlpatterns = [
|
||||
# ...
|
||||
path('graphql', GraphQLView.as_view(graphiql=True)),
|
||||
path('graphql/', GraphQLView.as_view(graphiql=True)),
|
||||
]
|
||||
```
|
||||
|
||||
|
|
|
@ -198,7 +198,7 @@ For Django 2.2 and above:
|
|||
|
||||
urlpatterns = [
|
||||
# some other urls
|
||||
path('graphql', PrivateGraphQLView.as_view(graphiql=True, schema=schema)),
|
||||
path('graphql/', PrivateGraphQLView.as_view(graphiql=True, schema=schema)),
|
||||
]
|
||||
|
||||
.. _LoginRequiredMixin: https://docs.djangoproject.com/en/dev/topics/auth/default/#the-loginrequired-mixin
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
from django.urls import re_path
|
||||
from django.urls import path
|
||||
|
||||
from ..views import GraphQLView
|
||||
|
||||
urlpatterns = [
|
||||
re_path(r"^graphql/batch", GraphQLView.as_view(batch=True)),
|
||||
re_path(r"^graphql", GraphQLView.as_view(graphiql=True)),
|
||||
path("graphql/batch", GraphQLView.as_view(batch=True)),
|
||||
path("graphql", GraphQLView.as_view(graphiql=True)),
|
||||
]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from django.urls import re_path
|
||||
from django.urls import path
|
||||
|
||||
from ..views import GraphQLView
|
||||
from .schema_view import schema
|
||||
|
@ -10,4 +10,4 @@ class CustomGraphQLView(GraphQLView):
|
|||
pretty = True
|
||||
|
||||
|
||||
urlpatterns = [re_path(r"^graphql/inherited/$", CustomGraphQLView.as_view())]
|
||||
urlpatterns = [path("graphql/inherited/", CustomGraphQLView.as_view())]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
from django.urls import re_path
|
||||
from django.urls import path
|
||||
|
||||
from ..views import GraphQLView
|
||||
from .schema_view import schema
|
||||
|
||||
urlpatterns = [re_path(r"^graphql", GraphQLView.as_view(schema=schema, pretty=True))]
|
||||
urlpatterns = [path("graphql", GraphQLView.as_view(schema=schema, pretty=True))]
|
||||
|
|
|
@ -3,7 +3,7 @@ import warnings
|
|||
|
||||
from django.test import Client, TestCase, TransactionTestCase
|
||||
|
||||
DEFAULT_GRAPHQL_URL = "/graphql/"
|
||||
DEFAULT_GRAPHQL_URL = "/graphql"
|
||||
|
||||
|
||||
def graphql_query(
|
||||
|
|
Loading…
Reference in New Issue
Block a user