graphqlCaching

  • Property Manager name: GraphQL Caching
  • Behavior version: The v2023-01-05 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}}