-
Notifications
You must be signed in to change notification settings - Fork 151
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
The Graph
like entity CREATE, UPDATE & DELETE notifications
#13
Comments
The Graph
like entity CREATE, UPDATE & DELETE notifications
Hey! Thanks for opening the issue. This has been in our backlog for a while. I cannot give a precise timeline for it, likely in Q2. |
Hey, @bedeho ! We started work on GraphQL subscriptions and decided to go for pull-based implementation. However, this doesn't deliver exactly what you requested. For example, subscription for entity updates without efficient narrow filter will be problematic. Will such feature be still useful for you? |
Hi, appreciate the alert! So I am not sure I really understand what you mean by pull-based subscription? Do you have some specification or rough design described somewhere? |
Basically it repeatedly executes the same query and sends notification to the client when its result changes. |
The node does this itself you mean? What happens if an entity is mutated more than once between two pollings? Only the last update is announced? This would not be ideal, and can lead to very bad downstream effects if the client has mistaken semantics for the subscription, but it can also have some value compared to having nothing like today. |
Yes, exactly.
Treating arbitrary database updates as a sequence of actions sounds strange to me. If you have such cases I'm curious about that and would like to know more. When we thought about subscriptions we just meant common case of updating UI to the current state, where any view is a pure function of state... |
No you may be right that this may be totally fine for most practical uses, I can't quickly give you a counterexample. |
I would like to ask what plans exist, or could exist, for accommodating the following in Subsquid, with some plausible timeline:
The Graph
like entity CREATE, UPDATE & DELETE notificationsFor each entity type, that there was a subscription that allowed the client to detect the three events CREATE, UPDATE and DELETE, with suitable parameter values included. This is already in The Graph, and would be very useful. It would also be very useful if these subscriptions allowed for some input parameters that defined some filtering conditions, so the client could narrow down the events of interest.
The text was updated successfully, but these errors were encountered: