Unable to retrieve htm, raw for repeatable type

My issue is quite similar to this

but I have the schema, so his problem is maybe not the same as mine.

So I was following this tutorial = Gatsby with Prismic CMS #1 Setup and walkthrough - YouTube
where I created a repeatable type called posts... but on the schema, I need to write it like this post: require("./src/schemas/posts.json") instead of posts: require("./src/schemas/posts.json"), in order to get it working and display slugs node. why is that?

And by following the docs, for the Rich Text field, I need to have raw:
render={slice.primary.content.raw}

query MyQuery {
  prismicPosts {
    data {
      post_title {
        text
      }
      post_thumbnail {
        url
        alt
      }
      body {
        slice_type
        primary {
          text {
            text  < ---- I want it to be raw or html but cant find a way to do it.
          }
        }
      }
    }
  }
}

I'm still new to this whole ecosystem so pardon my beginner mistake and understanding.
What I want is how to render slice zone for repeatable type. For single type, I'm able to but seems like the process is different.

I have tried following method:

query MyQuery {
  allPrismicPost {
    edges {
      next {
        data {
          post_title {
            text
          }
          post_thumbnail {
            url
            alt
          }
          body {
            ... on PrismicPostBodyText {
              slice_type
              primary {
                text {
                  raw
                }
              }
            }
          }
        }
      }
    }
  }
}

but its returning null

After hours of googling, seem like slug are deprecated and replace with UID.. How do I properly replace with UID

const path = require("path")

exports.createPages = async ({ reporter, actions, graphql }) => {
  const { createPage } = actions
  const blogTemplate = path.resolve("src/pages/detail.js")

  const result = await graphql(`
query MyQuery {
  allPrismicPosts {
    edges {
      node {
        id
        slugs
      }
    }
  }
}
  `)

  if (result.errors) {
reporter.panic(result.errors)
  }
  const posts = result.data.allPrismicPosts.edges
  posts.forEach(({ node }) => {
createPage({
  path: `/detail/${node.slugs[0]}/`,
  component: blogTemplate,
  context: {
    slug: node.id,
  },
})
  })
}

Hello Julio, welcome to the forum!

I just wanted to let you know that we're currently investigating this issue; there's another open similar thread that we're simultaneously tracking.

As soon as we have more information about this, we'll let you all know.

And about the path generation. You can query uid instead of slug, and you’ll get the uid, but actually, if you've correctly set up your link resolver you will only have to query the url value and pass it to the path:

Thanks

Hello Julio, I hope you're doing great.

I'm reaching out to you to ask you for the URL of your repository and the JSON of the custom type that is causing the error. You can send me this info via dm if you prefer

We need this info so we can further investigate the Gatsby issue using your endpoint.

Looking forward to your response.

Small update: in the linked thread we found that dashes in the API IDs of the fields cause problems when trying to generate the schema. If you have dashes - in any of your fields you'll need to modify them and update the content in the documents.

This issue has been closed due to inactivity. Flag to reopen.

any updates on this issue? running into exactly the same issue still

My issue is because slugs are recently deprecated and prismic don't really make it visible in their docs couple with some bad practice made by some Youtuber. Read the docs don't follow any youtube tutorial. There are only a couple of them and either using bikir plugin or using a deprecated way. I Just replace slugs with UID.

Read this

Make sure to add link resolver files. Example

const linkResolver = doc => {

  if (doc.type === "news") {

    return `/news/${doc.uid}`

  }

  return "/"

}

module.exports = linkResolver

Which is your issue? I spend quite a long time to understand the problem till finally managed to solve it.