Modeling your content

THIS PAGE
1. Create a table
2. Adding fields
3. Publishing your changes

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.

Example: Movie when creating a Netflix like API or About us when 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.

Screenshot

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 Us page for a website.
  • List Tables: Stores an array or a list of content entries for the graph that you define. For example the Movie table for a Netflix like API.

Once you're done, hit create to create the table. You will see it appear on the graph.

Screenshot

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.

Screenshot

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.

    Example: A Movie table would have title, summary, posterImage, genres as fields

    Screenshot

  • 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.

    Example: A Movie table might have a fieldset called Cast that contains an array of cast members with their movie roles.

    Screenshot

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.

Screenshot

  • 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.

Screenshot

That's it! You should've published your graph and the CMS and the API should be live and accessible.