I am trying to figurate why am I getting this error
FirebaseError: Too many arguments provided to Query.startAt(). The number of arguments must be less than or equal to the number of Query.orderBy() clauses
with this code:
const query = firebase
.getDatabase()
.collection("users")
.where("premium", "==", true) // get premium users
.where("totalPosts", ">", 0); // that have posted some music
...
return query
.startAt(0)
.limit(1)
.get()
.then((snapshot) => {
...
);
As you can see, I am trying to get premium users that have posted some music. I am using the where and startAt clause, and not the orderBy.
What am I doing wrong?
Thanks!