paint-brush
The New Object Field to Create Nested & Repeatable Data Structures 🚀by@webiny
256 reads

The New Object Field to Create Nested & Repeatable Data Structures 🚀

by Webiny Serverless CMSAugust 8th, 2021
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

The new Object field allows you to build nested data structures with ease. You can also nest objects within other objects. The data structure created with Object fields can be repeatable (like an array of nested objects) The Use as a repeatable object property allows the creation of the repeatable Object. The Object field respects all the rules and behaviours of all the other existing fields (ref, richText field, etc.) You also get a full GraphQL Schema auto-complete on your nested fields.
featured image - The New Object Field to Create Nested & Repeatable Data Structures 🚀
Webiny Serverless CMS HackerNoon profile picture



⚡️Seamlessly create nested and repeatable data structures with the new Object field.



Headless CMS - Object Field


With the latest Webiny 5.11.0 release, we are glad to introduce the new ‘Object Field in Headless CMS’ feature.


With the Object field you can create complex data structures with ease. Let's dive into the highlighting capabilities of the Object field.


Nested and repeatable data structures were some of the hot topics discussed in the Webiny community. We’d like to give a huge thanks to our community members for their suggestions and contributions.


Build Nested Data Structures


The new Object field allows you to build nested data structures. You can create an object and add various existing fields (ref, richText field, etc.) to it.


Along with this, you can also nest objects within other objects.


Address Model

Repeatable Structure


The icing on the cake is that the data structure created with Object fields can be repeatable (like an array of nested objects).


The Use as a repeatable object property allows the creation of the repeatable object. For example: Setting the Use as a repeatable object property to true on the Equipment model will make it multi-valued.


Repeatable Object

Below is the model view for the multi-valued Equipment field:


Multi Value Model

The preview of the model will look like this:


Multi Value Model Preview

GraphQL Schema Auto-Complete Support

Object field respects all the rules and behaviours of all the other existing fields (ref, richText field, etc.). You also get a full GraphQL Schema auto-complete on your nested fields.


Alright, let's see the demo in action!


Headless CMS - Object Field Demo

Try the new Headless CMS - Object field and please let us know your valuable feedback!