![]() ![]() I forgot to save the actual error text, so if you got that ugly error and you found this article after Googling for hours, days, and weeks, please add the error text in a comment below. CONTENTFUL RICH TEXT CODEMy old code looked something like this: export const pageQuery = graphql` query ContentfulBlogPost($slug: String!) Now, the one that gave me the most headaches was rendering the images in the Rich Text component, queried from Contentful with GraphQL. Everything broke, but most errors were relatively easy to fix after actually reading the error texts. The blog post is served on an application built with Next.js - but we won’t be going into Next.js in this post.I’ll skip the fluff and go straight to the point with this one.Ī few days ago I updated dependencies on a Gatsby website, after about one year of not touching it. The following examples use JavaScript to fetch data from this example blog post. Rendering Rich Text references using the REST API That’s the visual structure of the Rich Text field, but how is the content - and especially the references - represented in the JSON response? What are the differences between the REST and GraphQL API responses? Let’s take a look. The video embed entry contains the following fields:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |