graphqlCaching

  • Property Manager name: GraphQL Caching
  • Behavior version: The v2024-10-21 rule format supports the graphqlCaching 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}}