Open jarne opened 2 years ago
Any fix for that? I have the same issue in development to.
Any fix for that? I have the same issue in development to.
Wanna create a PR?
I had to add an ID to make it work fine in the development version. But when building a production version, it still doesn't download the same photo second time. @jarne Have you solved this problem somehow?
I had to add an ID to make it work fine in the development version. But when building a production version, it still doesn't download the same photo second time.
@jarne Have you solved this problem somehow?
Unfortunately no, I've tried to debug it and found out it might have something to do with createRemoteFileNode not returning the children of the query, but I wasn't able to fix it yet. I've temporarily commented out the images from my website.
I've the same problem. I've temporarily solved it by writing the data to a JSON file in the gatsby node in the development, then importing and using that file everywhere.
hello @chmielulu, could you please tell me how you do it thou, I've tried yarn develop
and copy the page-data
dir to one side, then during yarn build
, I copy the page-data
dir back in, it does complete the build but resulting in image not found on section that has the disappearing image
I think the reason for this bug is the old approach to fetch data from directus. Since version 4 plugins should do it in a different way. https://www.gatsbyjs.com/docs/reference/release-notes/migrating-from-v3-to-v4/#do-not-create-nodes-in-custom-resolvers
I'll try to create PR soon.
Linear: ENG-62
Describe the Bug
Using gatsby-source-directus, when requesting a specific image using a GraphQL query in a static page query and in gatsby-node.js/page query of page created by gatsby-node.js, the children of the imageFile property are null on the second query.
The issue only happens on
gatsby build
, everything works fine when usinggatsby develop
.To Reproduce
https://github.com/jarne/gatsby-source-directus-bug-repro
gatsby build
, not when runninggatsby develop
Errors Shown
What version of Directus are you using?
9.7.0
What version of Node.js are you using?
16.14.2
What database are you using?
Postgres 13.6
What browser are you using?
Firefox, Safari
How are you deploying Directus?
Docker