-
Notifications
You must be signed in to change notification settings - Fork 4
Compile fails #34
Comments
Please see #23 |
Hi thanks for the link. I verified, but it looks to me like my Moltin ID is still being used where it should be. The same master build that compiled yesterday is also failing now on Netlify with the same error. I gave all my products main images, now the error states:
So it still seems some links are missing. Anything else I could possibly check? |
I̶t̶ ̶s̶e̶e̶m̶s̶ ̶t̶o̶ ̶m̶e̶ ̶t̶h̶e̶ ̶M̶o̶l̶t̶i̶n̶ ̶A̶P̶I̶ ̶c̶h̶a̶n̶g̶e̶d̶?̶ ̶I̶ ̶r̶e̶m̶e̶m̶b̶e̶r̶ ̶i̶t̶ ̶u̶s̶e̶d̶ ̶t̶o̶ ̶r̶e̶t̶u̶r̶n̶ ̶t̶h̶e̶ ̶m̶a̶i̶n̶I̶m̶a̶g̶e̶H̶r̶e̶f̶,̶ ̶n̶o̶w̶ ̶y̶o̶u̶ ̶h̶a̶v̶e̶ ̶t̶o̶ ̶d̶e̶r̶e̶f̶e̶r̶e̶n̶c̶e̶ ̶t̶h̶e̶ ̶m̶a̶i̶n̶I̶m̶a̶g̶e̶ ̶f̶r̶o̶m̶ ̶t̶h̶e̶ ̶r̶e̶l̶a̶t̶i̶o̶n̶s̶h̶i̶p̶ ̶i̶d̶'̶s̶ ̶f̶i̶r̶s̶t̶ |
@shendriksza not sure I follow... You can make the following query: {
allMoltinProduct {
nodes {
id
mainImageHref
}
}
} What does that query return inside GraphiQL? |
Sorry I was distracted on a tangent. I have identified the issue. It seems when we updated/deleted images on Moltin, the references to those images where not deleted as we assumed they were. So there are relationship id's on our products to images that don't exist anymore. |
@notrab I fixed the issue by writing a script that fetches all products and verifies that each relationship id exists and deleting it when it does not. Is it really the responsibility on our side, to verify the integrity of Moltin's internal references? Shouldn't the relationships be deleted automatically once the file no longer exists? |
@shendriksza Thanks for highlighting this issue. This is an issue with the API in which the I've raised this internally. |
@shendriksza can you share your solution. I'm running into the same issue. Thanks! |
@domtaylor basicallly the following (Python code) The "moltin" in this case is just a small wrapper library I wrote to call the Moltin endpoints
|
@shendriksza thanks so much for sharing. In the end I just created a new store and re-uploaded my products as I only have a few, but in case this happens again I'll rewrite your script for GatsbyJS. |
A new error cropped up for me while compiling:
In your gatsby-node.js where you destructure the main-image href:
Any idea why this is happening? Is there an issue with Moltin at the moment, not providing links to my images? Or does this happen because I might have posted images to Moltin without "public: true"?
Either way though, the plugin fails compilation due to it
The text was updated successfully, but these errors were encountered: