Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to use getDocuments? #5

Closed
Pasta opened this issue Apr 30, 2020 · 1 comment
Closed

how to use getDocuments? #5

Pasta opened this issue Apr 30, 2020 · 1 comment

Comments

@Pasta
Copy link

Pasta commented Apr 30, 2020

Hi,

super useful library! I'm trying to get a list of documents.

Looks like there is a getDocuments() function, but

`
environment.service.collection("collections").whereField("userId", isEqualTo: userId)
.getDocuments()
.sink(receiveCompletion: { completion in
switch completion {
case .finished: print("🏁 finished")
case .failure(let error): print("❗️ failure: (error)")
}
}) { snapshot in
doSomething(snapshot)
}.store(in: &cancelBag)

`
but sink and doSomething are never called even when get
public func getDocuments(source: FirestoreSource = .default) -> AnyPublisher<QuerySnapshot, Error>
returns a successful promise. What am I doing wrong?

@Pasta Pasta closed this as completed May 1, 2020
@Pasta
Copy link
Author

Pasta commented May 1, 2020

Actually managed to make this work =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant