from django.contrib import admin
from django.urls import path
from django.views.decorators.csrf import csrf_exempt
from billing_app.views import PublicGraphQLView, M2MGraphQLView, TeamGraphQLView
from billing_app.schemas.m2m_schema import m2m_schema
from billing_app.schemas.team_schema import team_schema

urlpatterns = [
    path('admin/', admin.site.urls),
    path('graphql/m2m/', csrf_exempt(M2MGraphQLView.as_view(graphiql=False, schema=m2m_schema))),
    path('graphql/team/', csrf_exempt(TeamGraphQLView.as_view(graphiql=True, schema=team_schema))),
]
