from django.contrib import admin
from django.urls import path
from django.views.decorators.csrf import csrf_exempt
from orders_app.views import test_jwt_orders, PublicGraphQLView, UserGraphQLView, TeamGraphQLView
from orders_app.schemas.public_schema import public_schema
from orders_app.schemas.user_schema import user_schema
from orders_app.schemas.team_schema import team_schema

urlpatterns = [
    path('admin/', admin.site.urls),
    path('graphql/public/', csrf_exempt(PublicGraphQLView.as_view(graphiql=True, schema=public_schema))),
    path('graphql/user/', csrf_exempt(UserGraphQLView.as_view(graphiql=True, schema=user_schema))),
    path('graphql/team/', csrf_exempt(TeamGraphQLView.as_view(graphiql=True, schema=team_schema))),
    path('test-jwt-orders/', test_jwt_orders, name='test_jwt_orders'),
]