-
contentful-resolve-response
Resolve items & includes of a Contentful API response into a proper object graph
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
-
contentful-graphql-vs-rest
A look at the difference between how to fetch and render linked assets and entries in the Rich Text field in Contentful.
As discussed in this blog post, under the hood, the JavaScript SDK uses the contentful-resolve-response package, which converts the flat nodes into a rich tree of data. **The one limitation of the Contentful API to remember is that it will only return linked entries up to a maximum of 10 levels deep that can be resolved((. However, given that our Rich Text field contains embedded entries and assets only one level deep in this example, weโre good to go.
There are a number of Rich Text field renderer packages available for your favorite programming languages and frameworks โ check them out on GitHub here.
Take a look at this example repository on GitHub, which is a demo Next.js application that contains all of the example code in this post, and demonstrates how we can fetch this data and render the Rich Text field linked assets and entries using both the REST API with JavaScript SDK and the GraphQL API.