nestjs / graphql

GraphQL (TypeScript) module for Nest framework (node.js) šŸ·
https://docs.nestjs.com/graphql/quick-start
MIT License
1.46k stars 396 forks source link

Remove Subscription schema check in ApolloFederationDriver #2879

Open erikwrede opened 1 year ago

erikwrede commented 1 year ago

Is there an existing issue that is already proposing this?

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 commented 1 year ago

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

kamilmysliwiec commented 1 year ago

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

PRs are more than welcome šŸ™Œ

magnusottosson commented 1 year ago

Any progress on this issue?

vladm0289 commented 1 year ago

@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.

erikwrede commented 1 year ago

@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.

vladm0289 commented 1 year ago

@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?

ProductOfAmerica commented 1 year ago

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

abdelrahman-essawy commented 9 months ago

any updates on this?

vtereshyn commented 8 months ago

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

kamilmysliwiec commented 8 months ago

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

snovos commented 8 months ago

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

dev-juju commented 8 months ago

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

bneigher commented 7 months ago

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

ErfanSeidipoor commented 4 months ago

Any progress on this issue?

jfairley commented 3 months ago

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.