DannyOriginal post
Rank 1: Thread
When I try to use queries on users, it gives error saying invalid query method.
Now, I dont know whether it is possible or not to query users or it’s just some bad code from my side.
Any help will be appreciated.
Summary
Issue: Developer facing an error with the queries on users in the Node.js SDK for Appwrite, getting an "invalid query method" error.
Solution: The `list` method for users in Appwrite's Node.js SDK doesn't directly support queries. Instead, you can use the `createSearch` method to create a complex search query. Here's an updated code snippet:
```js
const search = new sdk.Search(client)
const queries = [sdk.Search.field('name', 'User Name')]; // Define your custom queries here
const result = await search.create('<COLLECTION_ID>', queries, '<SEARCH>');
```
Replace