Currently I'm moving content to slice architecture and since some content types are redundant I deleted them from prismic (with all documents). I wanted to update gatsby source plugin as well. I deleted custom type file and remove schema from gatsby-config file. However on build I'm still getting "Invalid plugin options for "gatsby-source-prismic": JSON schema is missing ". I'm new to prismic so please guide me on what I'm missing here...
I am not sure about the issue, but have you followed this article on how to migrate into gatsby-source-plugin?
Suppose you have followed this article and still can't figure out this issue. Can you share with us your gatsby-config.js file and your Prismic repository name (in a private message if possible) to investigate this further issue?
To add to Fares' response, the error comes from not providing all Custom Type schemas. All Custom Types, including deleted Custom Types that have been used at least once, must be provided.
Since you are no longer using the Custom Types you deleted, you may provide the schema as an empty object like this in gatsby-config.js:
The plugin queries the Prismic REST API for a list of all Custom Types for the repository. This includes currently used types as well as any deleted types that have been used at least once. The plugin uses this list to verify that all Custom Type schemas have been provided.
This has the side-effect of requiring the empty object for deleted types, but also ensures all the types you are using are provided.
We will be kicking off our sessions this week. The session will be run through Google Meet and will take around 45 minutes to complete. As a thank you for your time, we'll provide you with an $35 USD gift card.
What to expect during the session:
We will show you a design prototype for Custom Type deletion in Slice Machine.
You’ll share your screen with us and talk us through how you’d expect to use this feature.
We’ll also ask you some questions based on the prototype and your particular use case.
This feature isn’t available yet. But it's already a work in progress. You can follow more updates about this and all other features on our progress page:
We're happy to announce that our new version of Slice Machine 0.7.0includes the long-requested feature: Slices and Custom Types deletion.
With this version, users can delete Slices and Custom Types directly in Slice Machine. This will significantly simplify the Slice management workflow, avoiding the hassle of using the Custom Types API for Slice deletion.