Hello again, I got another question. This time it'...
# prisma-whats-new
Hello again, I got another question. This time it's about subscriptions. Currently I'm using polling to keep the contents of my site up-to-date, when external changes occur. This will trigger a http request with the size of a few KB every few seconds, which then fetches a single object (that's how my data is structured) with the name "Site". This object holds multiple child nodes, which also may or may not hold child nodes (I mean relations/connections by writing children). Like this, the fetching of new data is not very efficient, as the polling happens no matter what, even if there are no changes in the db. The best solution for me at this moment, would be a subscription, that would keep the whole Site Object updated (with all children). It would need to trigger on CUD operations for the Site and every other node, that is related. Is this possible at all? I'm aware of the fact that this usually works a little bit differently and data is normally fetched via a query at multiple points in the code (sometimes for each component separately), but my nodes do have multiple connections (a<-->b a<-->c b<-->c) that will make the different elements really dependant on each other and especially on all CUD operations. If I would do it like this, I would have to keep multiple websockets open at once and I don't know if this is all that good... Thanks to everyone in advance! 🙂
I really, really recommend to post this on the Forum instead.
@nilan I will do that and post the link in this thread.
For everyone, that is interested in an answer, I followed @nilan's advice and posted the question in the official forum. Here is the link: https://www.graph.cool/forum/t/how-to-implement-a-top-level-subscription-with-multiple-child-nodes/3070
👍 1