Edit GraphQL cache settings

Updates the GraphQL caching settings configured for an endpoint version.

Path Params
integer
required

The unique identifier for the endpoint version.

integer
required

The unique identifier for the endpoint.

Query Params
string

For customers who manage more than one account, this runs the operation from another account. The Identity and Access Management API provides a list of available account switch keys.

Body Params

GraphQL caching settings configured for an endpoint. GraphQL caching settings specify properties such as the query and body parameters that contain GraphQL queries, maximum age of cached content, and downstream cacheability. You can configure GraphQL caching settings if the API Gateway product is in your contract.

string
required

The name of the JSON body parameter that contains a GraphQL query in an incoming POST request. If the request's content type is application/json, this is the name of the key that contains a GraphQL query as its value. If the request's content type is application/graphql, edge servers treat the entire request body as a GraphQL query.

boolean | null

Whether to set the maximum age for caching GraphQL responses (TTL) to the value specified in your origin’s Cache-Control HTTP response header.

boolean | null

Whether edge servers should cache the response to a GraphQL-type request in case errors are present in the response body.

boolean
required

By default, GraphQL queries return partial data if only a portion of a request fails. In such cases, status codes don't indicate errors. Instead, an errors array in a response body contains error details. This indicates whether edge servers should inspect the response body for the errors array.

downstreamCaching
object
required

Downstream caching settings. Downstream caching refers to the caching instructions assigned to objects sent with responses toward clients, for example browsers, mobile devices, or client proxies.

boolean
required

Whether you enabled GraphQL caching for the endpoint.

maxAge
object | null
required

The maximum duration to keep content in a cache.

integer | null

The maximum size of the query. A post body or a get response can't exceed 4 KBs.

string | null

The number of supported nesting levels within a query. The maximum number is 100.

preRefreshing
object | null

Cache prefreshing settings. When enabled, edge servers asynchronously refresh cached objects after a specified percentage of the object's TTL elapses.

string
required

The name of the query parameter that contains a GraphQL query in an incoming GET or POST request.

boolean | null

Whether to serve stale responses when the origin is unreachable and content revalidation isn't possible.

Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
application/problem+json