Open ChrisSG opened 4 years ago
@martijnwalraven @abernix Could you please shed some light on this?
Same here, Didn't see anything planned in the 3.x roadmap
@martijnwalraven @abernix
Where should we start? What are the basic inner workings of it and what is the main problem?
Where should we start? What are the basic inner workings of it and what is the main problem?
From my perspective (React - browser), one of the non-trivial problems is the need to triage a client subscription to an individual backend service and maintain multiple subscriptions. Key details that are think are problematic:
This obstacle appears to be similar to not being able to use multiple GraphQL endpoints nicely in the Apollo Client (without overriding the apolloClient prop in the component).
As far as solving this problem, I would appreciate any information that can refute or support my perspective. I'm happy to jump in after Q2, but could use someone else's perspective before contributing. I just need a direction. Any details would be much appreciated.
what are options for federation and subscriptions ?
@lwintch you can checkout mercuriusjs as a reference implementation. The client creates a single connection to the gateway, and the gateway creates another connection to the respective service.
Hello any update on this feature. We are waiting for it. Is there any beta version to be released?
didn't intend to flood this thread. But I believe a briefing from maintainers could help relieve the despair of the community
I am happy to help out with the implementation of this, but I think some guidance from maintainers would be nice. I agree with the topics as pointed out by @lwintch .
The original support for GraphQL Subscriptions was Apollo's first attempt at answering the need for Subscriptions and pre-dated the existence of Federation. We've learned a lot from that original approach, and with the release of Federation we started to get more feedback that is invaluable in building the future of subscriptions.
Apollo's current stance on how to implement subscriptions in a Federated graph is outlined in our recent blog post. It comes with working examples in a repository that can be cloned.
While we can imagine a future with a different story, we're not there yet and we believe that this is an approach that has worked quite well for the large-scale implementors we've worked closely with so far. We're certainly interested in more feedback on how this approach works, but we've had good reception to this!
@abernix Thank you for the feedback.
having waited for this a while now âł , i was instead able to put together a small library implementing federation with subscriptions (the way we'd hoped for, without a separate service just for subscriptions). was able to get it working using schema-stitching & graphql-tools, it's basically just transforming federation SDL into schema-stitching SDL and using websockets across the gateway & subgraphs: https://github.com/sammysaglam/federation-with-subscriptions
hope that helps
@sammysaglam well done! Thank you!
I've implemented the solution recommended in Mandi's post. However, I'm currently looking into incorporating CSRF protection. I notice that ApolloServer now has a beautiful csrfPrevention flag in its options. Any recommendations or advice on how to approach CSRF protection using Mandi's recommended approach?
Hello all,
I created this request as the community is desperately awaiting subscriptions in Apollo federation. I did this for gathering information, as it is obvious that subscriptions can't be implemented quickly because there seem to be non trivial problems on the way. The intent is to gather high level information around:
how subscriptions work in general
how they could be implemented for federation
what the problems are on the way
what could be done to solve those problem
Please everybody to contribute as it seems demanded and I guess a lot of people are willing and able to help!
Thank you all!
Regards,
Christian