GraphQLView
Constructor:
Signature:
def __init__( self, schema: BaseSchema, graphiql: bool | None = None, graphql_ide: GraphQL_IDE | None = 'graphiql', allow_queries_via_get: bool = True,) -> None: ...
Parameters:
-
schema:
- Type
-
BaseSchema
-
graphiql:
- Type
-
bool | None
- Default
-
None
-
graphql_ide:
- Type
-
GraphQL_IDE | None
- Default
-
'graphiql'
-
allow_queries_via_get:
- Type
-
bool
- Default
-
True
Methods:
-
get_root_value
Signature:
def get_root_value(self, request: Request) -> RootValue | None:...Parameters:
-
request:
- Type
-
Request
-
-
render_graphql_ide
Signature:
def render_graphql_ide(self, request: Request) -> Response:...Parameters:
-
request:
- Type
-
Request
-
-
get_sub_response
Signature:
def get_sub_response(self, request: Request) -> TemporalResponse:...Parameters:
-
request:
- Type
-
Request
-
-
error_response
A wrapper for error responses.
Returns:
An errors response.
Signature:
def error_response(message: str,error_code: str,http_status_code: int,headers: Dict[str, str | List[str]] | None = None,) -> Response:...Parameters:
-
message:
The error message.
- Type
-
str
-
error_code:
The error code.
- Type
-
str
-
http_status_code:
The HTTP status code.
- Type
-
int
-
headers:
The headers to include in the response.
- Type
-
Dict[str, str | List[str]] | None
- Default
-
None
-
-
get_context
Signature:
def get_context(self, request: Request, response: TemporalResponse) -> Context:...Parameters:
-
request:
- Type
-
Request
-
response:
- Type
-
TemporalResponse
-
-
create_response
Signature:
def create_response(self,response_data: GraphQLHTTPResponse,sub_response: TemporalResponse,) -> Response:...Parameters:
-
response_data:
- Type
-
GraphQLHTTPResponse
-
sub_response:
- Type
-
TemporalResponse
-
-
execute_request
Signature:
def execute_request(self, request: Request) -> Response:...Parameters:
-
request:
- Type
-
Request
-
Attributes:
-
allow_queries_via_get:
- Type
-
bool
-
request_adapter_class:
-
schema:
-
graphql_ide: