Comments (8)
Hey guys. Is there any work on this issue? still waiting for subscriptions. I hope this feature will be next.
Anyway, good luck guys and thank you for all the work y'all are doing.Hey, we are not actively working on this. We have had some internal discussions though, we realise that to get a scalable solution would be a lot of work - something to look into after we are finished working on 2.0.0(relationship properties and cursor based pagination).
I see. Thank you Daniel for the response and good luck with your work.
from graphql.
Hey guys. Is there any work on this issue? still waiting for subscriptions. I hope this feature will be next.
Anyway, good luck guys and thank you for all the work y'all are doing.
Hey, we are not actively working on this. We have had some internal discussions though, we realise that to get a scalable solution would be a lot of work - something to look into after we are finished working on 2.0.0(relationship properties and cursor based pagination).
from graphql.
+1! Love this repo and the people working on it, I think that this project has so much potential. I see you've had some internal discussions on this feature, and now that both relationship properties and cursor based pagination is implemented I just had a couple of quick notes on scalability & functionality for this feature:
-
I'm assuming you'll be hooking into the result of mutations and emitting some kind of event in order to push subscriptions out to the client as neo4j does not have any kind of watch functionality. If this is the case, how will you handle horizontal scaling (eg, deployments in graphql with multiple replicas). Will we be able to pass in a pub sub provider (redis, kafka, or something custom) so that any websocket connections which may be on a different instance would still receive the result of that subscription?
-
It would also be nice if we could subscribe to events on the OGM side.
Example use cases for OGM subscription functionality:
- if a blog post is created or updated to the published state, send a notification to all subscribers of that blog.
- If a blog post is deleted by a moderator, send a notification to the publisher of that blog post. If the blog post is hard deleted (as is default functionality in this repo), that subscription should include the details of that blog post because at that point it won't be able to be queried.
- After a blog post is created with a published on date in the future, schedule a job in bull queue to publish that post.
- After a comment is "connected" to a blog post, alert the moderators of that blog post
- If a comment is "disconnected" from a blog post by a moderator, alert the commentor of that blog post
Of course, this has other implications, such as if the application is scaled to more than one instance, how do we prevent these events from happening more than once if each instance is performing the same functionality? That might be something that we can just leave to the user to figure out (bull queue comes to mind as a solution) as it seems outside of the scope of this application. However, for ease of use, it might be nice to also send an "event id" for each event to make it easier to schedule jobs in bull queue.
Other ways this functionality could be implemented:
- A pre/post hook system that would allow hooks to be able to be passed into the Neo4jGraphql instance. It would be two objects: preHooks and postHooks. Each object would be composed of the nodes that could be mutated, and each node would be composed of resolver-like functions for create, update, delete, connect, or disconnect. I am currently using a forked branch with such a system for my purposes temporarily, but if my two requirements match your intended functionality of this feature I am willing to use my janky hook system for now until subscriptions come online!
I am really looking forward to this feature! Let me know if any help is needed with this. Thanks!
from graphql.
Hey guys. Is there any work on this issue? still waiting for subscriptions. I hope this feature will be next.
Anyway, good luck guys and thank you for all the work y'all are doing.
from graphql.
Hi,
What is the current progress on supporting subscriptions with the new library ?
I understand that #515 will not be merged, and that #1076, #1090 and #1101 got merged instead.
Does that mean that the next release will close this issue ? Is there a timeline for it ? 🎉
from graphql.
HI @AdrienLemaire I apologise for not answering earlier.
You are correct, and subscriptions are already supported as a beta since the release 3.1 last week 🥳
I will close this issue now, further development in this area will be covered by separate issue
from graphql.
I concur, subscriptions would be a great feature to be supported and certainly mandatory in some projects.
Originally posted by @manonthemat in #179 (comment)
from graphql.
Following this issue so I can know when to migrate from neo4j-graphql-js to this lib (we're already using subscriptions).
Originally posted by @AdrienLemaire in #179 (comment)
from graphql.
Related Issues (20)
- Support for date math expressions when comparing date and time fields
- Subscriptions do not reliably return strings or numbers for ids HOT 2
- Parameter naming leads to error HOT 2
- Custom query names HOT 1
- Subscriptions don't support update_relationship
- Field with populatedBy directive should appears in UpdateInput or CreateInput when not defined in the operations HOT 8
- Cannot deactivate the top-level queries for unions HOT 10
- Export the Neo4jGraphQLError classes
- Add "filtering" and "sorting" support to fields that rely on custom resolvers HOT 1
- Relationship is settable via update mutation, but settable directive is set to false. HOT 9
- Wrong cypher generated for nodes with multiple labels HOT 2
- `Neo4jError: Invalid input 'WHERE': expected` when using auth in specific scenarios HOT 3
- Argument "phrase" is blocked for custom cypher queries since Neo4j-GraphQL >5 HOT 2
- Querying an interface produces very slow query with a lot of UNION HOT 3
- Neo4jError: Variable not defined caused by authorization filters HOT 4
- Model.find({where: {id}}) returns wrong output. HOT 6
- Regression on ID scalar type filtering HOT 8
- Neo4jError: Variable `<propertyName>Count` not defined HOT 5
- Error "Cannot return null for non-nullable field" when limit exceeds result count in queries with non-nullable fields HOT 2
- Docs: Troubleshooting page: update logging filter from "execute" to "execution" in order to log Cypher queries HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from graphql.