GraphQLHTTPConsumer

A consumer to provide a view for GraphQL over HTTP.

To use this, place it in your ProtocolTypeRouter for your channels project:

from strawberry.channels import GraphQLHttpRouter
from channels.routing import ProtocolTypeRouter
from django.core.asgi import get_asgi_application
application = ProtocolTypeRouter({
"http": URLRouter([
re_path("^graphql", GraphQLHTTPRouter(schema=schema)),
re_path("^", get_asgi_application()),
]),
"websocket": URLRouter([
re_path("^ws/graphql", GraphQLWebSocketRouter(schema=schema)),
]),
})

Methods:

Attributes:

  1. allow_queries_via_get:

    Type
    bool
  2. request_adapter_class: