My requirement is to run a query with multiple variables.
type Record {
asset(count: String!, lang: String!): Cat!
}
query ($count: String!, $lang: Str!) {
asset(coun: $count, lang: $lang) {
vid {
orig
}
}
}
{
count:"abc", lang:"def"
}
This works fine, but I want to run for multiple combinations of count and lang. For example:
{
count:["abc", "def"],
lang:["a", "b"]
}
I want to send count as “abc” and lang as “a” in one request, and then count as “def” and lang as “b” in another request. How to do this in graphql?
I tried to change query definition to query ($count: [String!], $lang: [Str!])
, but it’s not working. I read there is a way as alias, but I have large query and more than 10 combination.