GraphQLView

Class based view to handle GraphQL HTTP Requests.

Args: schema: strawberry.Schema graphiql: bool, default is True allow_queries_via_get: bool, default is True

Returns: None

Example: app.add_route( GraphQLView.as_view(schema=schema, graphiql=True), “/graphql” )

Constructor:

Signature:

def __init__(
self,
schema: BaseSchema,
graphiql: bool | None = None,
graphql_ide: GraphQL_IDE | None = 'graphiql',
allow_queries_via_get: bool = True,
json_encoder: Type[json.JSONEncoder] | None = None,
json_dumps_params: Dict[str, Any] | None = None,
) -> None:
...

Parameters:

  1. schema:

    Type
    BaseSchema
  2. graphiql:

    Type
    bool | None
    Default
    None
  3. graphql_ide:

    Type
    GraphQL_IDE | None
    Default
    'graphiql'
  4. allow_queries_via_get:

    Type
    bool
    Default
    True
  5. json_encoder:

    Type
    Type[json.JSONEncoder] | None
    Default
    None
  6. json_dumps_params:

    Type
    Dict[str, Any] | None
    Default
    None

Methods:

Attributes:

  1. allow_queries_via_get:

  2. request_adapter_class:

  3. schema:

  4. json_encoder:

  5. json_dumps_params:

  6. graphql_ide: