Home platformOS Logo

Model Relations

Last edit: Apr 15, 2020

With properties, you can create your custom fields for storing the data. In the properties, you can also store the id of an existing object. Then you can fetch the data with related_model(join_on_property: String!) or the related_user(join_on_property: String!) field in GraphQL.

In order to export/import data with relations preserved, you need to define them in model schema files using the belongs_to attribute.

name: house
- name: address
  type: string
name: cars
- name: color
  type: string
- name: house_id
  type: integer
  belongs_to: house

Contribute to this page

Github Icon


We are always happy to help with any questions you may have.

contact us