Open Jussiles opened 4 years ago
Seems nobody has been interested in this issue. I will try to take the discussion about naming convention further.
Is there any documentation about how the naming convention should be between Prismic - Prismic GraphQL API - Gatsby (this plugin)?
What worked for our project before on gatsby-config.js
(type: PageCore
, type: BlogPost
…) doesn’t work anymore after the PR (https://github.com/prismicio/gatsby-source-prismic-graphql/pull/2) was merged. I know I could create new Custom type with new API ID as a workaround. But that would require me upgrade our Prismic plan from Starter to Medium to import/export the existing content to the new Custom type. It’s not what I want to do in the first place.
On the Prismic side our Custom type API IDs are: page-core, blog-post…
Should the naming conventions for Custom type be documented somewhere? After it there can be fixes done based on documentation for the plugin if needed.
Thoughts?
Hi @Jussiles
Error: Unknown type "PRISMIC_SortPagecorey". Did you mean "PRISMIC_SortPageCorey",
Hmm looks like an error with capitalisation :/
You you provide a recreation of the issue in the examples and open a PR?
If you run into issues creating an example, I recommend using gatsby 2.24.11
Just hit this too. My prismic content type was labeled: "blog_post", I then attempted to use a config for my page as:
{
type: 'blog_post',
path: '/blog/',
match: '/blog/:uid',
previewPath: '/blog/',
component: require.resolve('./src/templates/blogPost.tsx')
}
I also tried types of: "BlogPost", "Blog_Post", "blog_post" and the only type I got to work was "Blog_post".
It seems as if there's an issue with handling _
special and uniquely.
After updating Gatsby from 2.21.9 I started getting this error. Then I updated also gatsby-source-prismic-graphql plugin from 3.6.2 to use this repo and latest tag 3.6.11. Error still exists. Happens on running
gatsby develop
orgatsby build
:This is my
gatsby-config.js
:Issue seems to be with
PageCore
. TypePage
works fine.I found some related issues from old and new repo but didn't find solutions from those. https://github.com/birkir/gatsby-source-prismic-graphql/issues/200#issuecomment-629206830 https://github.com/prismicio/gatsby-source-prismic-graphql/pull/2