Working in
Wix Studio Editor
The issue:
I’m trying to use the Query Comments API. I think there may be a miss match in the field names when querying by parentComment.id. It seems to be converting it to parentComment.commentId.
When I try and filter by parentComment.id, I keep getting an error message of:
"data": {
"unknownField": {
"fieldPath": "parentComment.commentId"
}
}
This is my backend code:
export async function myQueryRepliesPage(clickedItemData, cursorDetails) {
// app is wix comments
let options = { "appId": "91c9d6a7-6667-41fb-b0b4-7d3b3ff0b02e" };
// this is the parent comment id
let query = {
"filter": {
"parentComment._id": { "$eq": clickedItemData._id },
},
};
const elevatedQueryComments = auth.elevate(comments.queryComments);
const response = await elevatedQueryComments(query, options);
return response;
}
See the next comment for further query tests I have tried.
Many thanks!