-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gatsby-source-directus: Children of imageFile are null on build when requesting an image twice #1
Comments
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. |
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 |
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
The text was updated successfully, but these errors were encountered: