Retrieves the introspection schema for a GraphQL API.
Parameters:
-
api_id
(String)
–
-
format
(OutputType)
–
The schema format: SDL or JSON.
-
include_directives
(Optional[BooleanValue], default:
None
)
–
A flag that specifies whether the schema introspection should contain directives.
Raises:
Source code in docs_src/capo_appsync/_services/app_sync.py
| def get_introspection_schema(
self,
api_id: "capo_appsync.types.string.String",
format: "capo_appsync.types.output_type.OutputType",
*,
config_overrides: Optional[AppSyncClientConfig] = None,
include_directives: Optional[
"capo_appsync.types.boolean_value.BooleanValue"
] = None,
) -> "capo_appsync.types.get_introspection_schema_response.GetIntrospectionSchemaResponse":
"""<p>Retrieves the introspection schema for a GraphQL API.</p>
Args:
api_id: <p>The API ID.</p>
format: <p>The schema format: SDL or JSON.</p>
include_directives: <p>A flag that specifies whether the schema introspection should contain directives.</p>
Raises:
capo_appsync.errors.graph_ql_schema_exception.GraphQLSchemaException: <p>The GraphQL schema is not valid.</p>
capo_appsync.errors.internal_failure_exception.InternalFailureException: <p>An internal AppSync error occurred. Try your request again.</p>
capo_appsync.errors.not_found_exception.NotFoundException: <p>The resource specified in the request was not found. Check the resource, and then try again.</p>
capo_appsync.errors.unauthorized_exception.UnauthorizedException: <p>You aren't authorized to perform this operation.</p>
capo_appsync.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_appsync.types.get_introspection_schema_request.GetIntrospectionSchemaRequest]",
) -> OperationResponse[
"capo_appsync.types.get_introspection_schema_response.GetIntrospectionSchemaResponse"
]:
import capo_appsync._operations.aws_deepdish_control_plane_service.get_introspection_schema
output, http_response = (
capo_appsync._operations.aws_deepdish_control_plane_service.get_introspection_schema.get_introspection_schema(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetIntrospectionSchema")
)
input_: capo_appsync.types.get_introspection_schema_request.GetIntrospectionSchemaRequest = {
"api_id": api_id,
"format": format,
}
if include_directives is not None:
input_["include_directives"] = include_directives
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|