I am trying to access the users from a cloud function and everything works good, but when I add the select attribute to only select couple of fields but I get this error:
{"code":400,"type":"general_argument_invalid","response":{"message":"Invalid queries param: Invalid query method: select","code":400,"type":"general_argument_invalid","version":"1.4.13"}}
this is my code
if (queryStr.lastId) {
log('paginating')
queries.unshift(Query.cursorAfter(decodeURIComponent(queryStr.lastId)))
const response = await users.list([
...queries,
Query.select(['$id', 'name'])
])
return res.send(response)
}
You're trying to get 1 user?
The ID is unique, so I think you should not use list endpoint to get 1 user
Recommended threads
- Self hosted project based backup
Is there a native way to perform a project-level backup in a self-hosted instance, instead of backing up the entire Docker instance? If not, I would like to off...
- function subdomain ssl certs
The generated subdomain isn't getting a valid ssl cert, I was wondering if appwrite automatically generates one or uses a wildcard for *.functions.domain.com? ...
- Whats best practise for Appwrite Cloud?
Appwrite Teams map very nicely to my needs, it is how i group users together. ... I use roles to define permissions. Should I also map a table to each team ? ...