graphql icon indicating copy to clipboard operation
graphql copied to clipboard

Remove Subscription schema check in ApolloFederationDriver

Open erikwrede opened this issue 1 year ago ā€¢ 15 comments

Is there an existing issue that is already proposing this?

  • [X] I have searched the existing issues

Is your feature request related to a problem? Please describe it

Apollo's Federation Router now brings support for subscriptions: https://www.apollographql.com/docs/router/executing-operations/subscription-support

Consequently, the exception that is thrown when building a schema with subscriptions should be removed from ApolloFederationDriver to make it fit for use with the new router.

Subgraph recently implemented subscription support, so this already good for release: https://github.com/apollographql/federation/pull/2388

Describe the solution you'd like

see above

Teachability, documentation, adoption, migration strategy

No response

What is the motivation / use case for changing the behavior?

Make subscriptions available in federation

erikwrede avatar Jun 21 '23 11:06 erikwrede

Happy to provide a PR for this small change if the following preferences are clear:

  • Do you prefer Version Bump of the @apollo/subgraph dependency or runtime checks to ensure the subgraph version supports subscriptions?

erikwrede avatar Jun 21 '23 11:06 erikwrede

We'd prefer runtime checks to ensure the subgraph version supports subscriptions.

PRs are more than welcome šŸ™Œ

kamilmysliwiec avatar Jun 22 '23 07:06 kamilmysliwiec

Any progress on this issue?

magnusottosson avatar Sep 04 '23 08:09 magnusottosson

@kamilmysliwiec, @erikwrede could you please answer to us guys about progress please if it possible. Iā€™m looking forward using this feature. Thanks in advance.

vladm0289 avatar Sep 05 '23 21:09 vladm0289

@vladm0289 I have done some preliminary work in https://github.com/nestjs/graphql/pull/2916 which has been ready for review for some time now. I will continue once that is merged as it includes some dependency updates necessary for the tests of the latter and ensures the development goes in the direction the maintainers of this library envision.

erikwrede avatar Sep 06 '23 12:09 erikwrede

@erikwrede thank you very much for your work and contribution to our community. It is very important and valuable labor for all of us. @kamilmysliwiec is any chance to merge?

vladm0289 avatar Sep 06 '23 13:09 vladm0289

I will pay for someone to implement fed2 subs. @kamilmysliwiec

ProductOfAmerica avatar Oct 13 '23 01:10 ProductOfAmerica

any updates on this?

abdelrahman-essawy avatar Feb 02 '24 23:02 abdelrahman-essawy

What would we do with that issue that is almost 1 year old?

vtereshyn avatar Feb 22 '24 11:02 vtereshyn

According to GraphQL docs, this feature is not available for free https://www.apollographql.com/docs/router/executing-operations/subscription-support/ and so we won't prioritize this ticket. If you want to work on this, go ahead - contributions are more than welcome

kamilmysliwiec avatar Feb 22 '24 13:02 kamilmysliwiec

I guess @kamilmysliwiec what you posted is related to route/gateway. But if subscription are available on subgraph itself i dont see any issues with this. Federation is not supported in subscriptions by Apollo, but you can still use subscriptions just not resolve entities

snovos avatar Mar 03 '24 22:03 snovos

What am I missing? https://www.youtube.com/watch?v=-4R6rLMZ9mc

dev-juju avatar Mar 15 '24 09:03 dev-juju

ah bummer.. our company just implemented our first few Subscriptions on our supergraph but now we can't upgrade to federation 2 šŸ˜¢

bneigher avatar Apr 03 '24 17:04 bneigher

Any progress on this issue?

ErfanSeidipoor avatar Jul 12 '24 19:07 ErfanSeidipoor

What am I missing? youtube.com/watch?v=-4R6rLMZ9mc

@dev-juju The subscription functionality is built into the Apollo Router, which is intended to go along with GraphOS. She even says at the end, they built it into the Router (which is written in Rust) instead of the Gateway (javascript), because they wanted to leverage multithreading to handle large numbers of subscriptions.

Subscriptions, specifically, is associated with the GraphOS Enterprise tier.

jfairley avatar Aug 06 '24 21:08 jfairley