Comments (8)
@zzullick we moved to another CMS. We're one of the case studies on the website too 💔.
from gatsby-source-graphcms.
Hey everyone,
I have the same issue with buildMarkdownNodes
working in development but not in production mode.
Are there any logs that we can provide to assist in debugging?
from gatsby-source-graphcms.
@notrab anything we can do to help on this one? We are stuck in a holding pattern on a few projects.
from gatsby-source-graphcms.
So i managed to work around the issue in my case, which is very similar to the case that you posted as an example @sbuys.
Here is a quick rundown of what i changed:
Previously, i was simply querying the ids of all posts/pages that contained the markdownNodes
in gatsby-node.js
, passed them to the gatsby template pages via the context and then retrieved all required fields within the template via page queries.
I found that when i query all required fields within gatsby-node
and then pass all of them via the context, the markdownNode
s are not null
anymore.
I am guessing that this might be either due to some sort of race-condition (might explain why it works during development as the fields are queried on demand) or an issue where certain nodes are simply not available during page queries.
from gatsby-source-graphcms.
Another piece of information:
I noticed that the workaround i posted above suddenly stopped working.
To get it working again, i needed to clean the cache and rebuild.
So it might also be a caching issue?
from gatsby-source-graphcms.
@DennisSimon thanks for the update. I'll look into the caching and report back.
from gatsby-source-graphcms.
@DennisSimon The problem actually seems tied to the code in onCreateNode()
.
Per the documentation for Gatsby v4, mutation of nodes outside of createNode()
is an anti-pattern. More info here.
field.value.markdownNode = markdownNode.id
will not update the node in the Gatsby store and the fact that it works in development is probably a fluke.
What I'm not sure about is how to use the recommended API createNodeField
as it seems you can't alter a field directly.
from gatsby-source-graphcms.
Any updates or workaround on this issue? Experiencing the same thing with 2.8.0
and gatsby 4.20.0
.
from gatsby-source-graphcms.
Related Issues (20)
- Assets and localizations HOT 2
- Previous and next navigation for posts filtered by Category in Gatsby project not working HOT 3
- [gatsby-source-graphcms]: Problem building GraphCMS nodes // Error: Bad Request HOT 1
- Dependency Dashboard
- on upgrading to Gatsby 4 return null on build HOT 9
- When build website get the following error "Cannot query field "allGraphCmsPost" on type "Query"" . HOT 2
- Problem building GraphCMS nodes when upgrading to Gatsby v4 HOT 8
- Local images are null on gatsby build, but correct in dev mode (Gatsby v4) HOT 36
- Make a note on Granular Permissions usage
- concurrency error HOT 2
- gatsbyImageData return a wrong structs for some images HOT 1
- Add ability to serve images in Webp format HOT 5
- Update baseURI to 'https://media.graphassets.com'
- Gastby build - connect ETIMEDOUT HOT 4
- Gatsby V2 fails to build fragments when model has nested components
- Locales not working through relations HOT 1
- [Updated] How can I identify a referenced component's type? HOT 6
- Error: Too Many Requests HOT 11
- Gatsby 5 support? HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gatsby-source-graphcms.