I try to filter a row which contain a string inside a string array column, however I get the following error:
{"name":"AppwriteException","code":400,"type":"general_query_invalid","response":"{\"message\":\"Invalid query method: contains\",\"code\":400,\"type\":\"general_query_invalid\",\"version\":\"1.8.0\"}"}
Is Query.contains() not supported on Cloud?
This is the code snippet:
const queries = [
Query.or([
Query.contains('visibility', 'public'), // Include posts with public visibility
Query.contains('visibility', currentUserId), // Include posts visible to the current user
]),
];
try {
return await ctx.backendClient.tablesDb.getRow<IPostsRow>({
databaseId: CDBApp,
queries,
rowId: postId,
tableId: ETable.Posts,
});
} catch (e) {
ctx.error(JSON.stringify(e));
throw new IKNotFoundError();
}
The intent: Even if the post exists, it should only be returned if the user is allowed to see it according to the visibility
Recommended threads
- Added Custom Domain - API requests with ...
I've added in a custom domain to Appwrite my domain itself is on cloudflare but has Appwrite name servers added and confirmed they work, I added the CAA in clou...
- Table contents missing (attributes+rows)
Here is an image of the cloud and the attributes that should exist Some of the table do have the data but others dont. I am able to access the rows via api c...
- Bug Report: type generation for enum of ...
### 👟 Reproduction steps in the enum element value, instead of English, use another language (Khmer), in my case Khmer text. ``` export enum ProvinceType { ...