Passing array on GraphQL

Viewed 12696

I've this kind of mutation:

mutation updateProducts($input1 : ProductInput!, $id1: ID!, $input2 : ProductInput!, $id2: ID!){
  p1: updateProduct(productInput: $input1, id: $id1){
      product{
      id
      showcaseOrder
    }

  }
enter code here
  p2: updateProduct(productInput: $input2, id: $id2){
      product{
      id
      showcaseOrder
    }
  }     

}

I am setting this variables:

{
  "input1": {
    "showcaseOrder": 2
  },
  "id1": "363",
  "input2": {
    "showcaseOrder": 1
  },
  "id2": "364"
}

I would like to pass an array with all information to the query instead of pass one by one.

1 Answers
Related