fiftyone.server.context¶
FiftyOne Server context
Classes:
|
-
class
fiftyone.server.context.
GraphQL
(schema: strawberry.schema.base.BaseSchema, graphiql: bool = True, keep_alive: bool = False, keep_alive_interval: float = 1, debug: bool = False, subscription_protocols=('graphql-transport-ws', 'graphql-ws'), connection_init_wait_timeout: datetime.timedelta = datetime.timedelta(seconds=60))¶ Bases:
strawberry.asgi.GraphQL
Methods:
get_context
(request, response)get_root_value
(request)process_result
(request, result)Classes:
alias of
strawberry.asgi.handlers.graphql_transport_ws_handler.GraphQLTransportWSHandler
alias of
strawberry.asgi.handlers.graphql_ws_handler.GraphQLWSHandler
alias of
strawberry.asgi.handlers.http_handler.HTTPHandler
-
async
get_context
(request: starlette.requests.Request, response: starlette.responses.Response) → fiftyone.server.data.Context¶
-
async
get_root_value
(request: Union[starlette.requests.Request, starlette.websockets.WebSocket]) → Optional[Any]¶
-
graphql_transport_ws_handler_class
¶ alias of
strawberry.asgi.handlers.graphql_transport_ws_handler.GraphQLTransportWSHandler
Methods:cleanup_operation
(operation_id)close
(code, reason)Close the WebSocket with the passed code and reason
get_context
()Return the operations context
get_root_value
()Return the schemas root value
handle
()handle_async_results
(result_source, operation_id)handle_complete
(message)handle_connection_init
(message)handle_connection_init_timeout
()handle_invalid_message
(error_message)handle_message
(message)handle_ping
(message)handle_pong
(message)handle_request
()Handle the request this instance was created for
handle_subscribe
(message)send_json
(data)Send the data JSON encoded to the WebSocket client
send_message
(message)
-
graphql_ws_handler_class
¶ alias of
strawberry.asgi.handlers.graphql_ws_handler.GraphQLWSHandler
Methods:cleanup_operation
(operation_id)close
([code, reason])Close the WebSocket with the passed code and reason
get_context
()Return the operations context
get_root_value
()Return the schemas root value
handle
()handle_async_results
(result_source, operation_id)handle_connection_init
(message)handle_connection_terminate
(message)handle_keep_alive
()handle_message
(message)handle_request
()Handle the request this instance was created for
handle_start
(message)handle_stop
(message)send_json
(data)Send the data JSON encoded to the WebSocket client
send_message
(type_, operation_id[, payload])
-
http_handler_class
¶ alias of
strawberry.asgi.handlers.http_handler.HTTPHandler
Methods:execute
(query[, variables, context, …])get_graphiql_response
()get_http_response
(request, execute, …)handle
(scope, receive, send)
-
pick_preferred_protocol
(ws: starlette.websockets.WebSocket) → Optional[str]¶
-
async
process_result
(request: starlette.requests.Request, result: strawberry.types.execution.ExecutionResult) → strawberry.http.GraphQLHTTPResponse¶
-
async