Deleting Custom Type and updating gatsby-config


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...

Hi @errorac,

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?

Looking forward to your response,

1 Like

I have got some input from my team; this issue can be because you are not passing all the custom types.

If you can't figure this out, can you please share your plugin configurations?

1 Like

Hi @errorac,

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:

// Example plugin configuration 
plugins: [
    resolve: 'gatsby-source-prismic',
    options: {
      // ...
      schemas: {
        my_custom_type: require('./custom_types/my_custom_type.json'),
        my_deleted_type: {}
      // ...

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.

I hope that helps!


Actually this cover everything. I will add empty objects for deleted types. Thanks! :slight_smile:


This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Hi everyone :wave:

Thanks for your valuable feedback concerning Deleting Custom Type!

:slight_smile: I am reaching out to invite you to our usability testing sessions.

The product team at Prismic is working on Custom Types deletion in Slice Machine.

We’d love to understand your use case and get your feedback on few screens, in order to design this feature the best way possible for you.

:spiral_calendar: We are currently scheduling participants for these video feedback sessions.

If you’re interested, please book a slot to talk to us .

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.

Let me know if you have any questions!

@mabel.tan Hello,
Is it possible to delete custom type now ?
Thank you

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. :tada: :rocket:

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.