Version: Edit on GitHub

Many-to-Many Object Relation

Data

Request

Get the associated categories.

{
  getCar(id: 9) {
    name
    categories {
      ... on object_Category {
        id
        name
      }
    }
  }
}

Response

{
  "data": {
    "getCar": {
      "name": "E-Type",
      "categories": [
        {
          "id": "559",
          "name": "Sports Cars"
        },
        {
          "id": "555",
          "name": "Grand Tourer"
        }
      ]
    }
  }
}