Allow to limit the GraphQL queries execution by setting a time limit.
If a query execution time exceeds the time limit, 408 Request timeout should be returned with following error message:
{
"errors": [
{
"message": "Maximum query time limit of 20ms exceeded",
"extensions": { "classification": "ExecutionAborted" }
}
]
}
Rationale
Avoid GraphQL queries that consume too much resources.
Detailed documentation
The GraphQL configuration parameter query-time-limit specifies the time limit in milliseconds for processing queries. Set to 0 for no time limit.
Example:
The following command starts RESTHeart overriding the configuration paramenter /graphql/query-time-limit setting a limit of 10s for GraphQL queries execution:
Brief overview
Allow to limit the GraphQL queries execution by setting a time limit.
If a query execution time exceeds the time limit,
408 Request timeout
should be returned with following error message:Rationale
Avoid GraphQL queries that consume too much resources.
Detailed documentation
The GraphQL configuration parameter
query-time-limit
specifies the time limit in milliseconds for processing queries. Set to 0 for no time limit.Example:
The following command starts RESTHeart overriding the configuration paramenter
/graphql/query-time-limit
setting a limit of 10s for GraphQL queries execution: