How to pass Array of Integer into GraphQl query using GrpahQl Varaible?

  Kiến thức lập trình

I’m new to GRAPHQL query, I need your help for making a query dynamically.
I’m able to achieve statically but I need the query dynamically.
So, Thanks in advance!!!

Here, I’ve put an image for Static and Dynamic query formation.

Here is the Static one
This is the example of static ids and working fine

In static example, I can get the correct data according to the id, which i have passed in array.
So, No issue in Static One.

Here is the Dynamic one
This is the example of Dynamic id which i passes using GraphQL Variable

The problem in Dynamic query, I get all the data, but I need the data which I passes as id.

So, Please help me on this.

I’ve tried both ways as above mentioned, but I’m getting all the data when i use Dynamic query.
I need the output same as static query.

New contributor

Jol is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

LEAVE A COMMENT