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