BaseGraphQLWSHandler
Constructor:
Signature:
Parameters:
-
schema:
- Type
-
BaseSchema
-
debug:
- Type
-
bool
-
keep_alive:
- Type
-
bool
-
keep_alive_interval:
- Type
-
float
Methods:
-
get_context
Return the operations context.
Signature:
-
get_root_value
Return the schemas root value.
Signature:
-
send_json
Send the data JSON encoded to the WebSocket client.
Signature:
Parameters:
-
data:
- Type
-
OperationMessage
-
-
close
Close the WebSocket with the passed code and reason.
Signature:
Parameters:
-
code:
- Type
-
int
- Default
-
1000
-
reason:
- Type
-
str | None
- Default
-
None
-
-
handle_request
Handle the request this instance was created for.
Signature:
-
handle
Signature:
-
handle_message
Signature:
Parameters:
-
message:
- Type
-
OperationMessage
-
-
handle_connection_init
Signature:
Parameters:
-
message:
- Type
-
OperationMessage
-
-
handle_connection_terminate
Signature:
Parameters:
-
message:
- Type
-
OperationMessage
-
-
handle_start
Signature:
Parameters:
-
message:
- Type
-
OperationMessage
-
-
handle_stop
Signature:
Parameters:
-
message:
- Type
-
OperationMessage
-
-
handle_keep_alive
Signature:
-
handle_async_results
Signature:
Parameters:
-
result_source:
- Type
-
AsyncGenerator
-
operation_id:
- Type
-
str
-
-
cleanup_operation
Signature:
Parameters:
-
operation_id:
- Type
-
str
-
-
send_message
Signature:
Parameters:
-
type_:
- Type
-
str
-
operation_id:
- Type
-
str
-
payload:
- Type
-
OperationMessagePayload | None
- Default
-
None
-
Attributes:
-
schema:
-
debug:
-
keep_alive:
-
keep_alive_interval:
-
keep_alive_task:
- Type
-
asyncio.Task | None
-
subscriptions:
- Type
-
Dict[str, AsyncGenerator]
-
tasks:
- Type
-
Dict[str, asyncio.Task]
-
connection_params:
- Type
-
ConnectionInitPayload | None