Is there a way to Get existing data + Subscribe to...
# prisma-whats-new
e
Is there a way to Get existing data + Subscribe to new ones? I noticed the subscription first shows nothing and waits for changes
n
@eliezedeck you need to combine a query with a subscription 🙂
it's being done here as well: https://demo.graph.cool/worldchat/
e
Sorry @nilan, I'm new to this whole GraphQL thing. So, if I understand, I have to run 2 separate commands, right? First is plain query, second is subscription.
Wouldn't that pose a race problem? There is a possibility of an event that could be missed between sending the first query and second subscription command. This is one of the use case that RethinkDB tackled right before it's first shutdown.
n
@eliecerthoms the race condition can be circumvented by first doing the subscription and then running the query