I have a "users" collection where each document within the collection represents a single user.
If I fetch all documents within the "users" collection, is that considered 1 read to the firebase usage quota or X reads (X being the number of documents within said collection)?
Current code looks like this:
static func fetchAllUsers(completion: @escaping([TFUser]) -> Void) {
var users = [TFUser]()
Firestore.firestore().collection("users").getDocuments { (snapshot, error) in
snapshot?.documents.forEach({ (document) in
let dictionary = document.data()
let user = TFUser(dictionary: dictionary)
users.append(user)
if users.count == snapshot?.documents.count {
completion(users)
}
})
}
}
Any insight on this matter is greatly appreciated. Thanks in advance.