[gatsby-source-strapi] content field returns null if cached copy exists (markdown via api)
See original GitHub issuePreliminary Checks
- This issue is not a duplicate. Before opening a new issue, please search existing issues: https://github.com/gatsbyjs/gatsby/issues
- This issue is not a question, feature request, RFC, or anything other than a bug report directly related to Gatsby. Please post those things in GitHub Discussions: https://github.com/gatsbyjs/gatsby/discussions
Description
The current version of gatsby-source-strapi converts “Rich Text” fields into markdown nodes using (content field on createNode). The initial build with no cache works great. Follow up builds when the markdown content has changed, or its parent has updated the relationship returns null. I’ve run the debugger on the plugin, and it appears to be working correctly. It creates the necessary nodes needed and the relationship id’s match.
It appears to behave slightly differently if it’s a single type vs a collection. on Collection nodes the content returns null on updates on Single Type node the content just doesn’t update
Related https://github.com/strapi/gatsby-source-strapi/issues/321
Reproduction Link
n/a
Steps to Reproduce
- Pull data from strapi site that contains (Rich Text/Markdown) field
- Build site
- Update content in (rich text) field or parent node
- Rebuild
The (rich text) field will now return null.
Expected Result
I expect to be able to query
content {
data {
content
}
}
and return the updated copy
Actual Result
the outer content returns null
Environment
System:
OS: Linux 5.10 Ubuntu 20.04.4 LTS (Focal Fossa)
CPU: (24) x64 AMD Ryzen 9 3900X 12-Core Processor
Shell: 5.8 - /usr/bin/zsh
Binaries:
Node: 14.19.3 - /usr/bin/node
Yarn: 1.22.19 - /usr/bin/yarn
npm: 8.12.1 - /usr/bin/npm
Languages:
Python: 2.7.18 - /usr/bin/python
npmPackages:
gatsby: ^4.15.0 => 4.16.0
gatsby-plugin-gatsby-cloud: ^4.15.0 => 4.16.0
gatsby-plugin-image: ^2.13.0 => 2.16.1
gatsby-plugin-layout: ^3.15.0 => 3.16.0
gatsby-plugin-manifest: ^4.15.0 => 4.16.0
gatsby-plugin-postcss: ^5.14.0 => 5.16.0
gatsby-plugin-purgecss: ^6.1.2 => 6.1.2
gatsby-plugin-react-helmet: ^5.13.0 => 5.16.0
gatsby-plugin-sharp: ^4.15.0 => 4.16.1
gatsby-plugin-use-dark-mode: ^1.5.0 => 1.5.0
gatsby-source-filesystem: ^4.15.0 => 4.16.0
gatsby-source-strapi: ^2.0.0 => 2.0.0
gatsby-source-strapi-plugin-navigation-v2: ^1.0.2 => 1.0.2
gatsby-transformer-remark: ^5.13.0 => 5.16.0
gatsby-transformer-sharp: ^4.15.0 => 4.16.0
npmGlobalPackages:
gatsby-cli: 4.16.0
Config Flags
No response
Issue Analytics
- State:
- Created a year ago
- Comments:6 (4 by maintainers)
That might be what I’m missing. Thanks so much.
Sounds like they’re missing https://www.gatsbyjs.com/docs/how-to/plugins-and-themes/creating-a-transformer-plugin/#creating-the-transformer-relationship
On Mon, Jun 13, 2022, 7:13 PM MRDRMUFN @.***> wrote: