[Query.equal('accountId', currentAccount.$id)]
THis is the query which I am passing in list ```js
async getCurrentUser(){
try {
let currentAccount = await this.account.get()
TypeScript
if(!currentAccount) throw Error
const currentUser = await this.database.listDocuments(
conf.DATABASE_ID,
conf.USER,
[Query.equal('accountId', currentAccount.$id)]
)
if(!currentUser) throw Error
return currentUser.documents[0]
} catch (error) {
console.log(error);
}
}
}``` but getting error as this is not valid
TL;DR
Developers should ensure they are using the correct version of the SDK. For detailed support, share the exact error messages. The issue within the code snippet seems to be with the query construction. Ensure that the `Query` object is correctly imported and used.Double check you're using the right version of the SDK.
Fyi, it's best to share exact error messages to give people more detail.
Recommended threads
- Any example for using Appwrite with Verc...
Can not find an example on this.
- AppwriteException Network request failed...
I'm watching a react native / expo tutorila that uses Appwrite as it's backend for its database. So, in this tutorial, there is implementing the seed functional...
- createDocument not returning result
when making a createDocument call, I am not getting the object created. The DB is updated properly. Is this expected behavior?