---
source: apollo-router/tests/integration/response_cache.rs
expression: response
---
{
  "data": {
    "topProducts": [
      {
        "name": "chair",
        "reviews": [
          {
            "body": "I can sit on it"
          }
        ]
      },
      {
        "name": "table",
        "reviews": [
          {
            "body": "I can sit on it"
          },
          {
            "body": "I can sit on it2"
          }
        ]
      },
      {
        "name": "plate",
        "reviews": [
          {
            "body": "I can sit on it"
          },
          {
            "body": "I can sit on it2"
          },
          {
            "body": "I can sit on it3"
          }
        ]
      }
    ]
  },
  "extensions": {
    "apolloCacheDebugging": {
      "version": "1.0",
      "data": [
        {
          "key": "version:1.1:subgraph:products:type:Query:hash:bf44683f0c222652b509d6efb8f324610c8671181de540a96a5016bd71daa7cc:data:070af9367f9025bd796a1b7e0cd1335246f658aa4857c3a4d6284673b7d07fa6",
          "invalidationKeys": [],
          "kind": {
            "rootFields": [
              "topProducts"
            ]
          },
          "subgraphName": "products",
          "subgraphRequest": {
            "query": "{ topProducts { __typename upc name } }"
          },
          "source": "subgraph",
          "cacheControl": {
            "created": 0,
            "maxAge": 60,
            "public": true
          },
          "shouldStore": true,
          "data": {
            "data": {
              "topProducts": [
                {
                  "__typename": "Product",
                  "upc": "1",
                  "name": "chair"
                },
                {
                  "__typename": "Product",
                  "upc": "2",
                  "name": "table"
                },
                {
                  "__typename": "Product",
                  "upc": "3",
                  "name": "plate"
                }
              ]
            }
          },
          "warnings": [
            {
              "code": "NO_CACHE_TAG_ON_ROOT_FIELD",
              "links": [
                {
                  "url": "https://www.apollographql.com/docs/graphos/routing/performance/caching/response-caching/invalidation#invalidation-methods",
                  "title": "Add '@cacheTag' in your schema"
                }
              ],
              "message": "No cache tags are specified on your root fields query. If you want to use active invalidation, you'll need to add cache tags on your root field."
            }
          ]
        },
        {
          "key": "version:1.1:subgraph:reviews:type:Product:representation:dd668a3ba05fb2fcd9e372b7063fe717f3ff1c209c29fa8367b8324e49775115:hash:06a24c8b3861c95f53d224071ee9627ee81b4826d23bc3de69bdc0031edde6ed:data:070af9367f9025bd796a1b7e0cd1335246f658aa4857c3a4d6284673b7d07fa6",
          "invalidationKeys": [],
          "kind": {
            "typename": "Product",
            "entityKey": {
              "upc": "1"
            }
          },
          "subgraphName": "reviews",
          "subgraphRequest": {
            "query": "query($representations: [_Any!]!) { _entities(representations: $representations) { ... on Product { reviews { body } } } }",
            "variables": {
              "representations": [
                {
                  "upc": "1",
                  "__typename": "Product"
                },
                {
                  "upc": "2",
                  "__typename": "Product"
                },
                {
                  "upc": "3",
                  "__typename": "Product"
                }
              ]
            }
          },
          "source": "subgraph",
          "cacheControl": {
            "created": 0,
            "maxAge": 10,
            "public": true
          },
          "shouldStore": true,
          "data": {
            "data": {
              "reviews": [
                {
                  "body": "I can sit on it"
                }
              ]
            }
          },
          "warnings": [
            {
              "code": "CACHE_CONTROL_SMALL_MAX_AGE",
              "links": [
                {
                  "url": "https://www.apollographql.com/docs/graphos/routing/performance/caching/response-caching/observability",
                  "title": "Monitor with telemetry"
                },
                {
                  "url": "https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Cache-Control",
                  "title": "Cache-Control header documentation"
                }
              ],
              "message": "The subgraph returned a 'Cache-Control' header with a small max-age (less than a minute) which could end up with less cache hits."
            }
          ]
        },
        {
          "key": "version:1.1:subgraph:reviews:type:Product:representation:17df34346610d06f667e1d99b701934ccc3c3985b0043ff253b109f2212824a0:hash:06a24c8b3861c95f53d224071ee9627ee81b4826d23bc3de69bdc0031edde6ed:data:070af9367f9025bd796a1b7e0cd1335246f658aa4857c3a4d6284673b7d07fa6",
          "invalidationKeys": [],
          "kind": {
            "typename": "Product",
            "entityKey": {
              "upc": "2"
            }
          },
          "subgraphName": "reviews",
          "subgraphRequest": {
            "query": "query($representations: [_Any!]!) { _entities(representations: $representations) { ... on Product { reviews { body } } } }",
            "variables": {
              "representations": [
                {
                  "upc": "1",
                  "__typename": "Product"
                },
                {
                  "upc": "2",
                  "__typename": "Product"
                },
                {
                  "upc": "3",
                  "__typename": "Product"
                }
              ]
            }
          },
          "source": "subgraph",
          "cacheControl": {
            "created": 0,
            "maxAge": 10,
            "public": true
          },
          "shouldStore": true,
          "data": {
            "data": {
              "reviews": [
                {
                  "body": "I can sit on it"
                },
                {
                  "body": "I can sit on it2"
                }
              ]
            }
          },
          "warnings": [
            {
              "code": "CACHE_CONTROL_SMALL_MAX_AGE",
              "links": [
                {
                  "url": "https://www.apollographql.com/docs/graphos/routing/performance/caching/response-caching/observability",
                  "title": "Monitor with telemetry"
                },
                {
                  "url": "https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Cache-Control",
                  "title": "Cache-Control header documentation"
                }
              ],
              "message": "The subgraph returned a 'Cache-Control' header with a small max-age (less than a minute) which could end up with less cache hits."
            }
          ]
        },
        {
          "key": "version:1.1:subgraph:reviews:type:Product:representation:ddf7d062949ffde207db2ced05093a823d64730d30fac573d6168f13cc8080c5:hash:06a24c8b3861c95f53d224071ee9627ee81b4826d23bc3de69bdc0031edde6ed:data:070af9367f9025bd796a1b7e0cd1335246f658aa4857c3a4d6284673b7d07fa6",
          "invalidationKeys": [],
          "kind": {
            "typename": "Product",
            "entityKey": {
              "upc": "3"
            }
          },
          "subgraphName": "reviews",
          "subgraphRequest": {
            "query": "query($representations: [_Any!]!) { _entities(representations: $representations) { ... on Product { reviews { body } } } }",
            "variables": {
              "representations": [
                {
                  "upc": "1",
                  "__typename": "Product"
                },
                {
                  "upc": "2",
                  "__typename": "Product"
                },
                {
                  "upc": "3",
                  "__typename": "Product"
                }
              ]
            }
          },
          "source": "subgraph",
          "cacheControl": {
            "created": 0,
            "maxAge": 10,
            "public": true
          },
          "shouldStore": true,
          "data": {
            "data": {
              "reviews": [
                {
                  "body": "I can sit on it"
                },
                {
                  "body": "I can sit on it2"
                },
                {
                  "body": "I can sit on it3"
                }
              ]
            }
          },
          "warnings": [
            {
              "code": "CACHE_CONTROL_SMALL_MAX_AGE",
              "links": [
                {
                  "url": "https://www.apollographql.com/docs/graphos/routing/performance/caching/response-caching/observability",
                  "title": "Monitor with telemetry"
                },
                {
                  "url": "https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Cache-Control",
                  "title": "Cache-Control header documentation"
                }
              ],
              "message": "The subgraph returned a 'Cache-Control' header with a small max-age (less than a minute) which could end up with less cache hits."
            }
          ]
        }
      ]
    }
  }
}
