but I have the schema, so his problem is maybe not the same as mine.
So I was following this tutorial = https://www.youtube.com/watch?v=u3GoLKTwNwY
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
}
}
}
}
}
}
}
}
}
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:
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.
Pau
closed , flag & select 'Something Else' to reopen.
8
This issue has been closed due to inactivity. Flag to reopen.
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.