GraphQLRouter
Constructor:
Signature:
Parameters:
-
schema:
- Type
-
BaseSchema
-
path:
- Type
-
str
- Default
-
''
-
graphiql:
- Type
-
bool | None
- Default
-
None
-
graphql_ide:
- Type
-
GraphQL_IDE | None
- Default
-
'graphiql'
-
allow_queries_via_get:
- Type
-
bool
- Default
-
True
-
keep_alive:
- Type
-
bool
- Default
-
False
-
keep_alive_interval:
- Type
-
float
- Default
-
1
-
debug:
- Type
-
bool
- Default
-
False
-
root_value_getter:
- Type
-
Callable[[], RootValue] | None
- Default
-
None
-
context_getter:
- Type
-
Callable[..., Context | None] | None
- Default
-
None
-
subscription_protocols:
- Type
-
Sequence[str]
- Default
-
(GRAPHQL_TRANSPORT_WS_PROTOCOL, GRAPHQL_WS_PROTOCOL)
-
connection_init_wait_timeout:
- Type
-
timedelta
- Default
-
timedelta(ExprKeyword)
-
prefix:
- Type
-
str
- Default
-
''
-
tags:
- Type
-
List[str | Enum] | None
- Default
-
None
-
dependencies:
- Type
-
Sequence[params.Depends] | None
- Default
-
None
-
default_response_class:
- Type
-
Type[Response]
- Default
-
Default(JSONResponse)
-
responses:
- Type
-
Dict[int | str, Dict[str, Any]] | None
- Default
-
None
-
callbacks:
- Type
-
List[BaseRoute] | None
- Default
-
None
-
routes:
- Type
-
List[BaseRoute] | None
- Default
-
None
-
redirect_slashes:
- Type
-
bool
- Default
-
True
-
default:
- Type
-
ASGIApp | None
- Default
-
None
-
dependency_overrides_provider:
- Type
-
Any | None
- Default
-
None
-
route_class:
- Type
-
Type[APIRoute]
- Default
-
APIRoute
-
on_startup:
- Type
-
Sequence[Callable[[], Any]] | None
- Default
-
None
-
on_shutdown:
- Type
-
Sequence[Callable[[], Any]] | None
- Default
-
None
-
lifespan:
- Type
-
Lifespan[Any] | None
- Default
-
None
-
deprecated:
- Type
-
bool | None
- Default
-
None
-
include_in_schema:
- Type
-
bool
- Default
-
True
-
generate_unique_id_function:
- Type
-
Callable[[APIRoute], str]
- Default
-
Default(generate_unique_id)
-
kwargs:
- Type
-
Any
- Default
-
{}
Methods:
-
pick_preferred_protocol
Signature:
Parameters:
-
ws:
- Type
-
WebSocket
-
-
render_graphql_ide
Signature:
Parameters:
-
request:
- Type
-
Request
-
-
process_result
Signature:
Parameters:
-
request:
- Type
-
Request
-
result:
- Type
-
ExecutionResult
-
-
get_context
Signature:
Parameters:
-
request:
- Type
-
Request
-
response:
- Type
-
Response
-
-
get_root_value
Signature:
Parameters:
-
request:
- Type
-
Request
-
-
get_sub_response
Signature:
Parameters:
-
request:
- Type
-
Request
-
-
create_response
Signature:
Parameters:
-
response_data:
- Type
-
GraphQLHTTPResponse
-
sub_response:
- Type
-
Response
-
Attributes:
-
graphql_ws_handler_class:
-
graphql_transport_ws_handler_class:
-
allow_queries_via_get:
-
request_adapter_class:
-
schema:
-
keep_alive:
-
keep_alive_interval:
-
debug:
-
root_value_getter:
-
context_getter:
-
protocols:
-
connection_init_wait_timeout:
-
graphql_ide: