Release 16.0 240110.16.0

Happy New Year! :fireworks:

We're excited to introduce a significant new feature this year: Availability Inheritance.

Features

What is Availability Inheritance?

In Skylark, the concept of availability is fundamental. It's a way to control who can see what, empowering our customers to segment their user base however they see fit.

Each object in Skylark, like images, credits, genres, etc. can have its own availability settings, leading to beautifully optimised responses for every user segment.

In the past, taking full advantage of this functionality required assigning availability rules individually for each object. For instance, if you wanted a thumbnail image to be available to the same user segment as its parent movie, you had to manually set this.

Now, with Availability Inheritance, things get simpler. You can now set certain objects to automatically inherit their availability settings from a related parent object. For example, if you change the availability of a movie, the same settings will automatically apply to all its associated credits.

How Does It Work?

Here's an example of how you set up inheritance. In this case, we're activating inheritance on the credits relationship of the Movie type.

mutation {
  setRelationshipConfiguration(
    object: Movie, 
    relationship_name: "credits", 
    relationship_config: 
  {
  	inherit_availability: true
  }) {
    inherit_availability
  }
}

Whenever availability is added or changed on a Movie, the same will also be applied to all its credits.

Seeing the Inheritance in Action

You can check if an object's availability is inherited and identify its source. For example, you can list the availability settings for a movie and see if it's inheriting these settings and from where:

query {
  getMovie(uid: "01HKRPKRXS551SF4BW66DD9A2X") {
    title
    availability {
      objects {
        inheritance_source
        inherited_by {
          objects {
            __typename
            uid
            ... on Credit {
              slug
            }
          }
        }
      }
    }
  }
}

The response looks like so:

{
  "data": {
    "getMovie": {
      "title": "Star Wars: Episode V - The Empire Strikes Back",
      "availability": {
        "objects": [
          {
            "inheritance_source": true,
            "inherited_by": {
              "objects": [
                {
                  "__typename": "Credit",
                  "uid": "01HKRPJEQJ2JKCRXC46S45T0K8",
                  "slug": "frank-oz-actor-yoda"
                },
                {
                  "__typename": "SkylarkTag",
                  "uid": "01HKRPJ64005EJ42006M1Q085X"
                }
              ]
            }
          }
        ]
      }
    }
  }
}

Here, the availability set for "Star Wars: Episode V - The Empire Strikes Back" is inherited by a Credit and a SkylarkTag object.

📘

While the inheritance relationship appears instantly, the actual availability settings are still processed in the background.