Link New Availability Rules

If you’ve not created the availability entry you want to link to an object, you can create it and link it in the same request using the create field in the object input.

The create field accepts either a single availability input object or an array of multiple availability input objects.

mutation createEpisode {
  createEpisode(
    episode: {
      title: "Nier Automata ver1.1a - s01e01", 
      availability: {
        create: [
          {
            start: "2020-01-01T00:00:00Z",
            end: "2023-01-01T00:00:00Z",
            dimensions: {
              link: [
                {
                  dimension_slug: "operating-system",
                  value_slugs: ["ios", "android"]
                }
            	]
            }
          },
          {
            start: "2023-01-02T00:00:00Z",
            end: "2025-01-01T00:00:00Z",
            dimensions: {
              link: [
                {
                  dimension_slug: "operating-system",
                  value_slugs: ["ios"]
                }
              ]
            }
          }
        ]
      }
    }) 
  {
    uid
    title
  }
}

Response:

{
  "data": {
    "createEpisode": {
      "uid": "73c18d10-cec4-4237-ae96-9ecdd34d55f8",
      "title": "Nier Automata ver1.1a - s01e01"
    }
  }
}