Skip to content

Try to use within forkJoin, get issue to display in html. #104

Answered by luii
peterhe2000 asked this question in Q&A
Discussion options

You must be logged in to vote

You are trying to forkJoin two QueryResults together, this is the problem.

Okay what is happening there, let me explain. By the looks of it you've wrapped the get user and get todos into a UseQuery and now you are trying to forkJoin both the user and todos query together.
forkJoin is constructed to await all observables (until they've pushed something) that it got passed to, but in order, but what now happens is that as soon as they get called, they'll likely emit a value which is kept inside the wrapped UseQuery and therefore it emits this update to the forkJoin, but what also happens is that both observables will close as soon as they have emitted once.

To say it basically, you cant wra…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@luii
Comment options

@peterhe2000
Comment options

Answer selected by peterhe2000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants