BloodThermic
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. BloodThermic
NVM I Got it
BloodThermic
[SOLVED] attributes.map is not a function error
Recommended threads
- Issue with relations on database
I'm creating a food ordering website for businesses. I'm having issues with the relations on my database I attached the attributes for the collections I'm hav...
- The current user is not authorized to pe...
I want to create a document associated with user after log in with OAuth. The user were logged in, but Appwrite said user is unauthorized. User is logged in wi...
- self-hosted auth: /v1/account 404 on saf...
Project created in React/Next.js, Appwrite version 1.6.0. Authentication works in all browsers except Safari (ios), where an attempt to connect to {endpoint}/v1...