from django.contrib import admin
from django.urls import path
from django.views.decorators.csrf import csrf_exempt
from teams_app.views import test_jwt, PublicGraphQLView, UserGraphQLView, TeamGraphQLView
from teams_app.schemas.public_schema import public_schema
from teams_app.schemas.user_schema import user_schema
from teams_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/', test_jwt, name='test_jwt'),
]