'Appsync how to use [String] inside query
I am trying to get products using specific brand names. I have set up my query as brandList : [String]
and the query is as follows
{
"terms": {
"brand_name":
$brandList
}
},
I am not sure how can I pass my query to Appsync. the original query should be like this
"["brand1","brand2","brand3"]". how can I handle the list of string with just brand name.
Solution 1:[1]
To be able to execute a query by filtering with an "in" operator it is only possible by using the enhanced filters (or by using the request mapping template).
I suggest you look here: https://docs.aws.amazon.com/appsync/latest/devguide/aws-appsync-real-time-enhanced-filtering.html
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Riccardo M |
