command curl -X POST http://localhost:8000/__refresh doesn't delete the documents from the CMS #38912
Open
2 tasks done
Labels
status: triage needed
Issue or pull request that need to be triaged and assigned to a reviewer
type: bug
An issue or pull request relating to a bug in Gatsby
Preliminary Checks
Description
I'm using the Gatsby Livepreview on my Gatsby App (version 5.12.4).
So I have this variable in my env.development file : ENABLE_GATSBY_REFRESH_ENDPOINT=true
My Gatsby app is connected to a CMS Drupal (version 10).
When i used to change or add a new document in my CMS, and then launch the command "curl -X POST http://localhost:8000/__refresh", i can see the modifications in realtime.
But when i delete a document from my CMS, and then refresh my page, the document is still displayed.
I put some logs in the gatsby-node.js, and i can see that when the _refresh is done, the document is no more fetch. But it will be displayed on the front.
The only way is to rebuild my app with "gatsby develop" to make it disappears.
I can't find any solutions to apply the same behavior for ADD / MODIFY and DELETE.
Is it a normal behavior ? How can i have the same behavior when i delete a document.
Reproduction Link
https://codesandbox.io/p/devbox/awesome-gates-vksw35?file=%2Fsrc%2Fplugins%2Fgatsby-source-documents%2Fgatsby-node.js%3A26%2C21
Steps to Reproduce
...
Expected Result
I want to have the same behavior than Add and Modify documents.
When the server is running, when i delete my document in my CMS, and the launch the command "curl -X POST http://localhost:8000/__refresh ", the document shouldn't appear in my front.
Actual Result
The document is still displayed in my front. The only way to make it disappear, is to relaunch my app with a "gatsby develop".
Environment
Config Flags
No config Flag
The text was updated successfully, but these errors were encountered: