UPDATE
This worked out after I created the object as text in request structure and used formula to set value {“stringValue”: “query”}
END UPDATE
If you are using where clause in runQuery with two fields - say one a stringValue and other a booleanValue. Since its the object with different properties at indexes o and 1 respectively, how can this me managed? As you suggested, I can keep the value (within where) as an object without properties. What formula should be used to map the values. This is the structure of my input request that works.
{
“structuredQuery”: {
“from”: [
{
“collectionId”: “UserContent”
}
],
“where”: {
“compositeFilter”: {
“filters”: [
{
“fieldFilter”: {
“field”: {
“fieldPath”: “contentType”
},
“op”: “EQUAL”,
“value”: {
“stringValue”: “query”
}
}
},
{
“fieldFilter”: {
“field”: {
“fieldPath”: “contentShow”
},
“op”: “EQUAL”,
“value”: {
“booleanValue”: true ---------> here the object property changes from string to boolean
}
}
}
],
“op”: “AND”
}
},
“orderBy”: [
{
“field”: {
“fieldPath”: “createdAt”
},
“direction”: “DESCENDING”
}
],
“limit”: 3
}
}