generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 89
Open
Labels
Description
Amplify Gen 2
Description
When I run queries like :
await client.models.Posts.list({
filter : {
post_tags : { contains : 't' }
}
});
or
await client.models.Posts.list({
filter : {
post_tags : { beginsWith : 't' }
}
});
It return empty data
{
"data": {
"listPosts": {
"items": []
}
}
}
But when i run queries with exactly values in list attribute it return expected result
await client.models.Posts.list({
filter : {
post_tags : {contains : 'tag1'}
}
});
returned data
{
"data": {
"listPosts": {
"items": [
{
"post_id": "1"
}
]
}
}
}
does it normal or a bug?
Database schema
Posts : a.model({
post_id : a.string().required(),
post : a.string(),
post_tags : a.string().array()
}).identifier(['post_id'])
Example data to input
{
post_id : "1",
post : "post_exmaple",
post_tags : ["tag1","tag2","tag3"]
}