List type tables are exactly like normal database tables when you want to store multiple rows of data in your table which is usually the case. It is the default table type selected when you create a table.
Think of
LIST
type as anArray
type which can store multiple items.
In the Graph
Create a List table by simply creating a new table and marking the type as LIST
. For most of the use-cases, LIST type tables should be used.
In the CMS
When you publish a LIST
type table, it's available in the Content Management System. You can start adding data by cliking on the +
button in the left navigation.
If you want to view the data entries in your left navigation by any other field name, you can do that by selecting the Viewing by
dropdown.
In the API
In the API the output for a list type table is an array with the fields inside them as the keys.
Sample GraphQL Request
query {
employees {
firstName
lastName
designation
picture {
url
}
}
}
Sample GraphQL Response
{
"data": {
"employees": [
{
"firstName": "Favian",
"lastName": "Witting",
"designation": "Senior Response Representative",
"picture": {
"url": "https://cloudflare-ipfs.com/ipfs/Qmd3W5DuhgHirLHGVixi6V76LhCkZUz6pnFt5AJBiyvHye/avatar/154.jpg"
}
},
{
"firstName": "Craig",
"lastName": "Donnelly",
"designation": "Lead Response Specialist",
"picture": {
"url": "https://cloudflare-ipfs.com/ipfs/Qmd3W5DuhgHirLHGVixi6V76LhCkZUz6pnFt5AJBiyvHye/avatar/1067.jpg"
}
},
{
"firstName": "Reagan",
"lastName": "McKenzie",
"designation": "Senior Research Engineer",
"picture": {
"url": "https://cloudflare-ipfs.com/ipfs/Qmd3W5DuhgHirLHGVixi6V76LhCkZUz6pnFt5AJBiyvHye/avatar/680.jpg"
}
}
]
}
}