Closed outspokeio closed 1 year ago
How did you write your queries? Sure you did everything right? I recommend using the GraphiQL tool and just copy paste your working query from there.
Check the version of gatsby-source-strapi
. I was running into the same issue and I had version 0.0.10
which was not working with singleTypes. I upgrade to 0.0.12
and I was able to view single types in Graphql
@outspokeio I encountered similar problem. There are some steps you can try to fix your problem:
Thanks for your interest in this project. This plugin is moving into the Gatsby User Collective and this repo will be archived. Please open an issue in that repository, submit a PR if you'd like to see this implemented, or join us on Discord if you have questions!
Hello and thank you for your support. I moved my organization from a Wordpress framework to Strapi/Gatsby and a big part of the "sell" was the use of singleTypes to create re-usable components that match front end display components in Gatsby.
No matter what I try I cannot get singleTypes to work in my repo(s). I have existing contentType queries that run off basic syntax. When I add the simplest of singleTypes collections it breaks my existing queries... which run fine without the "singleTypes: ['testSingle']" line.
Relevant info:
In Strapi: Single Type name = testSingle Collection name = testSingle (NOTE: This consists of a single text field... with the value "test1234").
Error I get when adding the singleTypes: ['testSingle'] line to the above config:
"gatsby-source-strapi" threw an error while running the sourceNodes lifecycle:
Request failed with status code 404
then.. as a result: Cannot query field "allStrapiArticles" on type "Query".
NOTE: All permissions on this for both auth and public user types are checked. However - I did notice that for the singleType collections there are only 3 methods available -> delete, find and update. I imagine find is all we need but just pointing it out for the sake of inclusiveness.
I've spent a solid few hours trying to troubleshoot this. Hoping someone here can help! Don't want to give the Wordpress contingent any reason to push back on our use of Strapi.
Thank you!