Graphql error - abstract type

Hi, first time content modelling with prismic. I think I may have made an error.

I added a slice to a singeton homepage type slice area. Added some content and then decided it would be better served in the main part of the page not the slice zone. So I deleted the slice.

I then added the slices I needed for the page.

Now when I run a query in graphiql I get the following error referencing the deleted slice type. It seems that there is an entry in the database with the old slice type but I can't delete it as it isn't showing up in prismic.

Here is the error message:-

{
  "errors": [
    {
      "message": "Abstract type \"PrismicHomepageDataBodySlicesType\" was resolve to a type \"PrismicHomepageDataBodyHeaderslider\" that does not exist inside schema.",
      "locations": [
        {
          "line": 8,
          "column": 7
        }
      ],
      "path": [
        "prismicHomepage",
        "data",
        "body",
        1
      ],
      "extensions": {
        "stack": [
          "GraphQLError: Abstract type \"PrismicHomepageDataBodySlicesType\" was resolve to a type \"PrismicHomepageDataBodyHeaderslider\" that does not exist inside schema.",
          "    at ensureValidRuntimeType (/Users/philsealey-imacpro/Documents/Exposure Design/Code/actorschurch/gatsby-prismic/achurch-gatsby-static/node_modules/graphql/execution/execute.js:698:11)",

Any pointers greatly appreciated.

PHIL

Have realised that I can archive and then delete that singleton record - have done this and started afresh with my new slice schema and it's now working fine.

@ExposurePhil I'm glad that you were able to get this sorted out. Let us know if you have any other questions at any point :slight_smile:

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

Hi there, I'm having a similar issue: I created a slice type called "Tags", added some content to it, but then realised that's not what I wanted and deleted the slice from my custom types. I've removed it from my json schema, as far as I can tell it no longer exists! However I'm getting a console error:

GraphQLError: Abstract type "PrismicProjectDataBody1SlicesType" was resolve to a type
  "PrismicProjectDataBody1Tags" that does not exist inside schema.

And the 2 pages that used this type (for the half hour that I was experimenting with it) are no longer rendering at all.
I've tried restarting my project (running with Gatsby) several times but I can't seem to fix this. Would anyone have any insights?
In relation to @ExposurePhil's solution above, I cannot archive the parent document as it's got so much data in it. It's just that deleted slice that's causing the trouble.
Any help much appreciated :pray:
Thanks in advance

If this happens to anyone else - I fixed the issue by changing any other field in the parent document (where the deleted slice used to live) and saving and publishing that. Running gatsby clean (i.e. restarting) then worked fine and my pages are back :raised_hands: