How to Query Multiple Media Items by MyAnimeList IDs Using Anilist’s GraphQL API?

I’m working with a Anilist’s GraphQL API where the Media query supports fetching media by a single ID. The schema for the Media query looks like this:

query Media($idMal: Int!) {
  Media(idMal: $idMal) {
    ...media
  }
}

// idMal = [21, 166531]

However, I need to fetch multiple media items at once using an array of MyAnimeList (MAL) IDs. The API does not provide a query that allows fetching multiple items by an array of IDs in a single request.

I expected to efficiently fetch multiple media items using a single request or a more streamlined approach than making multiple separate requests.

Any help or suggestions would be greatly appreciated!