Get Related Objects

Getting related objects is very similar to getting objects normally.

In the fields for the object you are getting, i.e the “parent” object, you include the name of the relationship to the related object, i.e the “child” object.

📘

This relationship name can be set dynamically in the schema so don’t always expect the name of the relationship to Episode to be as simple as episodes! Always refer back to the schema to get the name of related fields.

Within the “child” object, you can then specify the fields from the object you’d like to have returned including children of the child. Meaning you can retrieve multiple layers of relationships in one query.

Example

query getSeason {
  getSeason(uid: "<season UID>") {
    uid
    title
    episodes {
      objects {
        uid
        title
        synopsis
      }
    }
  }
}