You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Im trying to post job feeds. But I want to make we capture when there are no jobs to show a message, but the build fails because the name of the feed doesnt have items in the rss feed to add to the database.
There was an error in your GraphQL query:
Cannot query field "allFeedGatsbyBlog" on type "Query".
The problem is with a vacancy/jobs feed there are likely times when the rss data returns nothing or no items. This then causes the graphql query to break as none of the nodes it is expecting have been returned. So a solution for this would be handy otherwise the plugin is unusable in when the feed returns no items.
I just found a solution for this. You can provide a custom schema in gatsby-node.js that sets up the GraphQL nodes regardless of whether the feed has items or not. This tutorial explains why it happens and how to write the schema.
In my case it's also a job board, served by the TeamTailor service. This is my schema customization:
Activity
lettie16 commentedon Mar 23, 2023
Was there any fix for this?
It also relates to the other issue here:
There was an error in your GraphQL query:
Cannot query field "allFeedGatsbyBlog" on type "Query".
The problem is with a vacancy/jobs feed there are likely times when the rss data returns nothing or no items. This then causes the graphql query to break as none of the nodes it is expecting have been returned. So a solution for this would be handy otherwise the plugin is unusable in when the feed returns no items.
mottox2 commentedon Mar 23, 2023
@lettie16
Thanks for the reminder. I missed this Issue and the problem still exists.
I will investigate around the end of this month.
jdahdah commentedon Jan 19, 2024
I just found a solution for this. You can provide a custom schema in
gatsby-node.js
that sets up the GraphQL nodes regardless of whether the feed has items or not. This tutorial explains why it happens and how to write the schema.In my case it's also a job board, served by the TeamTailor service. This is my schema customization:
I based it on the original GraphQL query, which in my case is:
Hope this helps!