Skip to content

angee.graphql.views

HTTP views for serving named GraphQL schemas.

graphql_endpoint

python
def graphql_endpoint(request: object, schema_name: str) -> HttpResponse

Dispatch an HTTP request to the named GraphQL schema view.

csrf_token

python
@ensure_csrf_cookie
def csrf_token(request: HttpRequest) -> JsonResponse

Set the CSRF cookie and return its token for the SPA to echo.

The session-cookie GraphQL endpoints are CSRF-protected; a browser client fetches this once and sends the token as X-CSRFToken on every mutation.

Released under the AGPL-3.0 License.