How to pass multiple properties to findAsset (GraphQL)

I have a GraphQL query:

{
  findAsset(id: "7a6e3566-d087-4e61-bdd2-e316126b416a") {
    metadata(path: "pixelWidth")
  }
}

This works and it returns the value of pixelWidth.

How can I get both pixelWidth and pixelHeight in one call? Is this possible?

The following produces an error and I’ve tried different delimiters (comma, semicolon etc):

{
  findAsset(id: "7a6e3566-d087-4e61-bdd2-e316126b416a") {
    metadata(path: "pixelWidth, pixelHeight")
  }
}

I think this is a limitation in the schema on the server?

Do I need to make two calls - like this?

One for pixelWidth:

{
  findAsset(id: "7a6e3566-d087-4e61-bdd2-e316126b416a") {
    metadata(path: "pixelWidth")
  }
}

And one for pixelHeight:

{
  findAsset(id: "7a6e3566-d087-4e61-bdd2-e316126b416a") {
    metadata(path: "pixelHeight")
  }
}

You can just use an alias:

{
  findAsset(id: "7a6e3566-d087-4e61-bdd2-e316126b416a") {
    pixelWidth: metadata(path: "pixelWidth")
    pixelHeight: metadata(path: "pixelWidth")
    all: metadata
  }
}

Thanks, Sebastian.

Your example works.

Also, I figured I can just use the following also:

{
  findAsset(id: "7a6e3566-d087-4e61-bdd2-e316126b416a") {
    metadata
  }
}

And it gives me:

"data": {
    "findAsset": {
      "metadata": {
        "pixelWidth": 1500,
        "pixelHeight": 1125
      }
    }
  }

I don’t know where I got it from but I thought metadata returned other properties as well apart from pixelWidth and pixelHeight :crazy_face: