Back

list Documents

  • 0
  • Web
Aasu Yadav
6 Apr, 2024, 16:56

Hello Appwrite developers,

I have been encountering issues for the past two weeks while working with Appwrite. The listDocuments method is not providing the data when performing the query. Additionally, the createEmailSession function is not working correctly. Could you please assist me in resolving these issues or provide guidance on how to fix them?

here the code try { const newResume = await databases.listDocuments( process.env.API_DATABASE_ID, process.env.API_COLLECTION_ID, [Query.equal("User_id", userId)] ) await set({singleData : newResume.documents}) } catch (error) { console.log("error on getting single data from db ", error) } },

and this error AppwriteException: Invalid query: {"method":"equal","attribute":"User_id","values":["661149c21d8591b41bd4"]} at Client.<anonymous> (http://localhost:5173/node_modules/.vite/deps/appwrite.js?v=40bef5d7:883:17) at Generator.next (<anonymous>) at fulfilled (http://localhost:5173/node_modules/.vite/deps/appwrite.js?v=40bef5d7:488:24)

TL;DR
Developers are having issues with the listDocuments method in Appwrite, which is not providing the data as expected. Additionally, the createEmailSession function is also not working correctly. An error message is being thrown regarding an invalid query. The issue seems to be related to the way the query is structured. Check the query format and ensure it aligns with the Appwrite documentation for proper execution.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more