TypeScript
import sdk, { ID, Permission, Role, Databases, Query } from "node-appwrite";
import {PUBLIC_API_ENDPOINT, PUBLIC_PROJECT_ID, PUBLIC_API_KEY, } from '$env/static/public'
// Init SDK
const client = new sdk.Client();
const databases = new sdk.Databases(client);
const collectionId = databases.listDocuments(
'64502243369b884d71f8',
'647295a5228d3bd685da',
[
Query.select("accountId", accountId)
]
);```
`attributes.map is not a function error`
I got this error when I changed `Query.search("accountId", accountId)` to `Query.select("accountId", accountId)`
TL;DR
The user encountered an error with the message "attributes.map is not a function". They were using the Appwrite SDK and had made a change in their code from `Query.search("accountId", accountId)` to `Query.select("accountId", accountId)`. The user later resolved the issue.NVM I Got it
[SOLVED] attributes.map is not a function error
Recommended threads
- THE COLUMNS STUCK ON PROCESSING HOW DO I...
I HAVE SELF HOSTED THE APPWRITE ON VPS
- Update row sheet not loading
After right clicking a row header and click update, the sidebar fails to load (never-ending skeleton)
- Impossible to create project via CLI?
Is it possible to create a new project via the appwrite CLI ? I need to create a few projects for something I'm working on and because i don't want to do it man...