-
Notifications
You must be signed in to change notification settings - Fork 29
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
Schema does not update without restarting 'gatsby develop' #42
Comments
@huntercaron I am unable to reproduce, FYI I use gatsby-starter-netlify-cms for compatibility testing. Have you defined a non-empty Also is |
@danielmahon thanks for digging into it! I've been using this for forestry.io (works great btw except for this hiccup), It's pretty odd actually, nothing was fixing it except for manually refreshing the schema. Tried |
@huntercaron One thing Ive noticed while developing this plugin is the |
Ah yeah that sounds just like what I've been experiencing. It's also my first time using Gatsby in a few years, I thought remembered it being more stable than this. What weird now is that seems to be working locally but broken in the forestry preview server (essentially they just run gatsby develop on a server). I tried looking to see if there was a way to force reload the schema but only found a server endpoint that would feel pretty hacky to ping from the node process. Not sure what to try next honestly |
@huntercaron do you need indentation in-front of your list items under gallery_images:
- "/assets/images (1).jpeg"
- "/assets/images (2).jpeg"
- "/assets/images (3).jpeg" should be gallery_images:
- "/assets/images (1).jpeg"
- "/assets/images (2).jpeg"
- "/assets/images (3).jpeg" |
@danielmahon I thought it would be easier to show the behaviour in a gif, I think I've found a pretty solid reproduction. You can see it works fine until the data hot-reloads (via commenting a line out), then it breaks. But I've found that it doesn't break when a different markdown file in the content folder exists. When I change the file extension of the 'contact' file to just a txt file, everything works as expected. Repo for the reproduction here: https://github.com/huntercaron/relative-bug Any ideas what might be going on? |
I'm having this same exact issue. I'm using it within a theme if that matters. |
I am also seeing this. In my case saving the markdown file in question again clears the error. It looks like the schema isn't generated properly on the first hot-reload after changing the file. A second hot-reload (triggered just by saving the file again, not actually changing anything) clears it. I don't have to restart the process It doesn't matter what I change in the file — a non-image field or the content itself. Just any kind of change results in a bad schema |
For context I was never able to fix this, and ended up moving my site to nextjs (not the solution for everyone of course) |
Having the same issue as well, it looks like gatsby-remark-relative-images does not convert the frontmatter images to actual images after hot reloading |
When editing images in Frontmatter while in development mode, the GraphQL queries break with the
Field "gallery_images" must not have a selection since type "[String]" has no subfields.
until you restartgatsby develop
.You can repro by commenting out an image in a list like this while running development
The text was updated successfully, but these errors were encountered: