Hi folks! I have a question about Graphcool’s serv...
# prisma-whats-new
j
Hi folks! I have a question about Graphcool’s server-side implementation of subscriptions. From what I can see every subscription is managed by nested, project-specific and model-specific managers (e.g.
SubscriptionManagerForModel
). I see that each of those model-specific managers handles database events specific to that model (creation, deletion, update) and then re-executes subscription queries and sends the result back to the respective subscribers. That’s all pretty clear. How does Graphcool deal with subscriptions that include deeply nested relationships though? E.g. with a subscription like
Copy code
subscription User {
  User {
    node {
      id
      name
      friends {
        interests {
          name
          tags {
            name
          }
        }
      }
    }
  }
}
Let’s say a tag or an interest is updated, how does Graphcool know that the above subscription is affected its query needs to be re-executed?
a
It doesn't, so it won't.
j
Oh 😄
Do you happen to know why it doesn’t? It seems like a desirable feature but I’ve been trying to solve it myself before and it is complex to say the least.
a
j
Ah, perfect. Thank you!
😎 1
👍🏻 1