With Space Cloud, you can quickly model your data and the relations that exist between them via the GraphQL Schema Definition Language (SDL).
Data modelling in Space Cloud has two significant roles:
If you are already excited and want to take the data modelling in Space Cloud for a quick spin, follow this guide.
With Space Cloud, you can easily model your databases using a Schema Definition Language (SDL) which is consistent across all databases.
While creating a table/collection through Mission Control, you provide its schema which looks something like this:
type post {
id: ID! @primary
title: String!
text: String!
category: String
is_published: Boolean!
published_date: DateTime
}
Space Cloud creates a table with all the constraints in the underlying database as per the schema you have mentioned.
If you want to change the schema, then you go to the Schema
tab in the Database
section and modify the schema. Space Cloud updates the table structure based on the new schema.
Whenever anyone performs a mutation on any table/collection, Space Cloud validates the data before actually performing the mutation on database. Thus, Space Cloud provides you with a decoupled validation plane which works independently of the database. This validation plane is especially helpful in schemaless databases.
ID
fields.createdAt
and updatedAt
timestamps.