sdk-for-node icon indicating copy to clipboard operation
sdk-for-node copied to clipboard

🐛 Bug Report: Query.select on users.list() not working

Open NobodyExceptHim opened this issue 1 year ago • 1 comments

👟 Reproduction steps

async function listUsers() {
    try {
        return await users.list([Query.select(["$id", "name", "email", "prefs"])]);
    } catch (e) {
        error_handler.setError((e as Error).message);
    }
}

👍 Expected behavior

Appwrite returns Users without unwanted attributes

👎 Actual Behavior

The function returns undefined

🎲 Appwrite version

Version 0.10.x

💻 Operating system

Linux

🧱 Your Environment

No response

👀 Have you spent some time to check if this issue has been raised before?

  • [X] I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

NobodyExceptHim avatar May 04 '24 18:05 NobodyExceptHim

Hi @NobodyExceptHim, Thanks for opening the issue.

The $queries array in the users.list method are pagination and filtering only. Select is included the selections queries which is not available for the users.list method.

byawitz avatar May 05 '24 17:05 byawitz