Describe the bug
gatsby-source-strapi does not invalidate Gatsby cache when a nested relation is updated more recently than its parent entity.
To Reproduce
Steps to reproduce the behavior:
- Create two collections in Strapi with a one-to-many relation and add some data.
- Source content from Strapi using gatsby-source-strapi.
{
singularName: "testParentThing",
queryParams: {
fields: "*",
populate: {
testChildThings: {
fields: "*",
},
},
},
}
- Update only the nested related item.
- Run Gatsby again with cache/incremental behavior in place.
- Observe that the parent Gatsby node is not considered changed.
Expected behavior
The Gatby caching mechanism should inspect the updatedAt and publishedAt dates in all nested relations to determine if the cache is expired.
System Info
- Run:
yarn gatsby info --clipboard in your project directory
System:
OS: macOS 15.7.3
CPU: (11) arm64 Apple M3 Pro
Shell: 5.9 - /bin/zsh
Binaries:
Node: 18.19.0 -
/private/var/folders/h1/2z_zmztd0cbcw40g4tt_wdk80000gn/T/xfs-9ae50c76/node
Yarn: 4.9.2 -
/private/var/folders/h1/2z_zmztd0cbcw40g4tt_wdk80000gn/T/xfs-9ae50c76/yarn
npm: 10.2.3 - /Users/michaelolund/.nvm/versions/node/v18.19.0/bin/npm
Browsers:
Chrome: 145.0.7632.160
Safari: 26.1
Describe the bug
gatsby-source-strapidoes not invalidate Gatsby cache when a nested relation is updated more recently than its parent entity.To Reproduce
Steps to reproduce the behavior:
Expected behavior
The Gatby caching mechanism should inspect the updatedAt and publishedAt dates in all nested relations to determine if the cache is expired.
System Info
yarn gatsby info --clipboardin your project directory