Release 5.0 - 230619.5.0

This update brings new features to customise Skylark and make it fit to your needs.

Features

Per object sorting

It's now possible to set which field to sort on for every relationship. This can be set on a type->relationship level, and overridden on specific objects at the object level.

For example, this query sets the sorting of movies in a brand to the movie_number field:

mutation MyMutation {
  setRelationshipConfiguration(
    object: Brand
    relationship_name: "movies"
    relationship_config: {default_sort_field: "movie_number"}
  ) {
    default_sort_field
  }
}

But if you decide to sort some brands differently, you have the power to do that.

mutation {
  updateBrand(uid: "01H31P4WNZ3TBTG5H54F78GRQR", brand: {
    relationships: {
      movies: {
        config: {
          default_sort_field: "release_date"
        }
      }
    }
  }) {
    uid
  }
}

Default language

We're introducing more options for account level setup, starting with setting the account default language.

When a default language is set, all queries and mutations which take a language argument will now default to your pre-set language if that argument is not sent in the request.

This can either be set at account creation by our customer services team, or it can be updated at any time via the API.

mutation {
  setAccountConfiguration(account_config: {
    default_language: "en-US"
  }) {
    account_id
    config {
      default_language
    }
  }
}

Request headers

Many arguments can now be sent as headers. In most cases, these headers take priority over the arguments.

This feature allows powerful new integrations, including our new Skylark Preview Chrome Extension.

Audience Dimensions

As many dimensions can be sent, this header has some extra behaviour. By default dimensions sent in the arguments and headers are merged together, with headers overriding any duplicate dimensions from the arguments.

However it is also possible to ignore dimensions from the arguments entirely in favour of dimensions from the headers with an extra header: {"x-override-dimensions": 1}.

Here are examples of ways to send dimensions.

As arguments:

query {
  getMovie(uid: "01H31P4WNZ3TBTG5H54F78GRQR", dimensions: [
    {
      dimension: "customer-types",
      value: "premium"
    },
    {
      dimension: "device-types",
      value: "smarttv"
    }
  ]) {
    uid
    title
  }
}

As headers:

{
  "x-sl-dimension-customer-types": "premium",
  "x-sl-dimension-device-types": "smarttv"
}

Ignore availability

As an argument:

query {
  getMovie(uid: "01H31P4WNZ3TBTG5H54F78GRQR", ignore_availability: true) {
    uid
    title
  }
}

As a header:

{
  "x-ignore-availability": 1
}

Language

As an argument:

query {
  getMovie(uid: "01H31P4WNZ3TBTG5H54F78GRQR", language: "en-US") {
    uid
    title
  }
}

As a header:

{
  "x-language": "en-US"
}