GuideReference
TrainingSupportCommunity

graphql_​caching

  • Property Manager name: GraphQL Caching
  • Behavior version: The v2023-05-30 rule format supports the graphql_​caching behavior v1.1.
  • Rule format status: GA, stable
  • Access: Read-write
  • Allowed in includes: Yes

This behavior configures how to cache Graph​QL-based API traffic. Enable caching for your Graph​QL API traffic, along with allow​_post to cache POST responses. To configure REST API traffic, use the rapid behavior.

OptionTypeDescriptionRequires
enabledboolean

Enables Graph​QL caching.

{"displayType":"boolean","tag":"input","type":"checkbox"}
cache_​responses_​with_​errorsboolean

When enabled, caches responses that include an error field at the top of the response body object. Disable this if your Graph​QL server yields temporary errors with success codes in the 2xx range.

{"displayType":"boolean","tag":"input","type":"checkbox"}
{"if":{"attribute":"enabled","op":"eq","value":true}}
post_​request_​processing_​error_​handlingenum

Specify what happens if Graph​QL query processing fails on POST requests.

{"displayType":"enum","options":["APPLY_CACHING_BEHAVIOR","NO_STORE"],"tag":"select"}
{"if":{"attribute":"enabled","op":"eq","value":true}}
APPLY_​CACHING_​BEHAVIOR

If your Graph​QL server does not allow mutations and subscriptions, this offloads requests.

NO_​STORE

Pass requests to the origin.

operations_​url_​query_​parameter_​namestring

Specifies the name of a query parameter that identifies requests as Graph​QL queries.

{"displayType":"string","tag":"input","type":"text"}
{"if":{"attribute":"enabled","op":"eq","value":true}}
operations_​json_​body_​parameter_​namestring

The name of the JSON body parameter that identifies Graph​QL POST requests.

{"displayType":"string","tag":"input","type":"text"}
{"if":{"attribute":"enabled","op":"eq","value":true}}