diff --git a/inc/Config/Query/GraphqlQuery.php b/inc/Config/Query/GraphqlQuery.php index ac61d222..47f94806 100644 --- a/inc/Config/Query/GraphqlQuery.php +++ b/inc/Config/Query/GraphqlQuery.php @@ -34,4 +34,16 @@ public function get_request_body( array $input_variables ): array { public static function get_config_schema(): array { return ConfigSchemas::get_graphql_query_config_schema(); } + + /** + * GraphQL queries are typically made with POST requests, however, we do + * want to cache the response to queries. Override the default HTTP behavior + * for POST requests and allow caching. + * + * Caching policy for GraphQL mutations is separately handled and disabled. + */ + public function get_cache_ttl( array $input_variables ): int|null { + // Return null for default cache TTL. + return null; + } }