After creating your project, the first step is to model the content that you plan on serving through your APIs.
An intuitive graph builder allows you to model your content intuitively through tables, fieldsets, and fields.
1. Create a table
Similar to how they work in databases, tables allow you to create different types of resources for your project.
Moviewhen creating a Netflix like API or
About uswhen creating a website.
So go ahead and click on the newly created project and the first thing you will see is the new table popup.
Name your Table and select if it's an individual or list table.
- Individual Tables: Stores a single piece of content for the graph that you define. For example the
About Uspage for a website.
- List Tables: Stores an array or a list of content entries for the graph that you define. For example the
Movietable for a Netflix like API.
Once you're done, hit create to create the table. You will see it appear on the graph.
2. Adding fields
Once you create a table, it's time to define all the fields that this table will contain.
Let's add some basic fields by clicking on the + next to the resource on the graph.
It's already open by default if you haven't added any fields.
There are two types of nodes that you can create in a table.
Fields: The most elementary part of your graph. It, in a sense, defines what columns your table will contain.
Movietable would have
Fieldsets: When you want to group some fields together. This can either be for semantics or if you want to store a list of entries for that group of data.
Movietable might have a fieldset called
Castthat contains an array of cast members with their movie roles.
3. Publishing your changes
Once you're done creating tables and their fields, it's time to publish your graph. All your changes are saved automatically but they're not made Live on the API and the Content Management System till you publish it.
- Once you verify that everything looks good
- Click on the publish button on the top-right to open the publish dialog and click on the Publish button.