Open ajz003 opened 4 years ago
I think the problem is in your type name.
I had a similar issue, my type was Quick start guide page
It seems that the plugin capitalizes only the first letter, and connects the spaces with a _
, so what worked for me was changing the type
property in the gatsby-config.js
, for the gatsby-source-prismic-graphql
to Quick_start_guide_page
.
So I suggest you try to change your type to Blog_post
or Blog_Post
, and try again?
I also experienced this issue and the suggestion above from noblica works - in Prismic the type is ukulele
and using Ukulele
in gatsby-config.js works.
I experienced the same, the prismic type in gatsby-config.js
has to start with Capital letter
IMHO, this is undocumented behavior, and should be added to the docs, to avoid further confusion.
@noblica Thanks for finding the workaround. This needs to at least be documented.
But really, the TypeName as Prismic shows it to users is how users should be expected to put it into the config. It's not ideal/intuitive for users to know that "Blog Post" has to be manually converted to any one of "Blog_Post", "Blog_post", or "blog_post," so that the system recognizes it.
Hey, I made a PR for this issue here: https://github.com/prismicio/gatsby-source-prismic-graphql/pull/2
https://github.com/birkir/gatsby-source-prismic-graphql/pull/214
Hope it's fine. Feel free to provide feedback!
When running
gatsby develop
orgatsby build
, I get the following error:I found that the Name "posty" is related to my options in the
gatsby-config.js
file. Specifically the object defining the type 'Blog Post'.I created a new custom type on Prismic called Article and used 'Article' in the type field instead, and worked. Is there a problem with having the type be separate words?