-
Notifications
You must be signed in to change notification settings - Fork 45
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
Sporadic GraphQL Error #6
Comments
Hi, thanks for opening an issue :-) Would you also post the |
Actually, would you also try changing your graphql query to use |
Thanks for your fast response! Here is the query:
The times it works it comes through to the consuming component. I tried to debug your plugin a bit (I'm not yet an expert in gatsbyjs) and found out, that on the exports.onCreateNode the check |
I have same problem. I add plugin to gatsby-config.js as in Readme and then just try reach siteSearchIndex via GraphiQL, but its not there. Edit: Seems that clearing gatsby's .cache folder helps. Maybe this will help :) |
Clearing the cache works for me too. But I have to do it every time I restart the dev server. But it's a temporary solution :-) |
Thank you for all the feedback and help. I will take a closer look at it this weekend possibly. Out of town across the country atm, but I'm going to try to take a closer look. Any additional help is greatly appreciated. :-) |
Clearing the cache does seem like a workaround, but less than ideal. I am still trying to track down this issue. I have a demo site repo to use as a test bed (https://github.com/andrew-codes/gatsby-plugin-elasticlunr-search-demo) |
Is this related to gatsbyjs/gatsby#3139 and subsequently fixed with gatsbyjs/gatsby#3218 ? |
I upgraded to the latest |
Checking in to say I'm also getting this error |
I've found out that the node get deleted in the gatsby staleNodes functions when rebuilded from cache. I still dont know why. https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby/src/utils/source-nodes.js |
Seeing this issue as well, on latest versions of everything. I've added a cache clearing script that runs before |
@shwanton what is your data source? |
@mathieuforest I'm getting data from GraphCMS and creating my own nodes. So I tried testing this today and this is working without clearing the cache. |
@shwanton I did publish a new version with @mathieuforest's fix almost immediately before you submitted your comment to the issue. Perhaps the latest version fixed the issue for you? It was a patch version I believe. I was successfully able to get @mathieuforest solution to work for me locally when I published the new version. If someone still has problems after version 1.0.4, please feel free to let me know. In the meantime, I will close this issue. Thanks for everyone's help! :-) |
hey Andrew, I have just faced into that problem. I am using
My gatsby config:
The output message is:
I also cleared |
I'd like to implement this plugin into my site, but most of the times when I run gatsby develop, I get a GraphQL Error.
Here is my gatsby configuration:
It seems it doesn't matter in which order the plugins are listed. 90% of the time, I get the error, sometimes it works.
Could this be a timing problem?
Thanks!
The text was updated successfully, but these errors were encountered: