Closed vasily-polonsky closed 1 year ago
created a PR https://github.com/dotansimha/graphql-yoga/pull/2966 As @apollo/subgraph version is already 2.4.0, worked for me without updating dependencies
btw, subscriptions from @graphql-mesh are also working
Thanks for the PR! It's merged and available with the latest release!
Is your feature request related to a problem? Please describe.
I am using Graphql Mesh + Graphql-Yoga with nest.js Wanted to use subscriptions, for real time events. But faced this error Error: No support for subscriptions when using Apollo Federation.
I found in the guild documentation that If I want to use Subscriptions with a Federated Gateway I should use Schema Stitching. As mesh uses schema stitching it should work. https://the-guild.dev/graphql/yoga-server/docs/features/apollo-federation
The problem is that subgraphs with apollo federation do not support subscriptions. And if I launch YogaDriver for nestjs, it doesnt support graphql federation syntax with @keys, @external, etc
Describe the solution you'd like
As recently apollo federation added support for subscriptions, tried to enable subscriptions but there is a check in the federation driver, but it has no effect. Maybe I did smt wrong, but should be as apollo-subgraph should support subscriptions now
Another solution would be to support graphql federation syntax for YogaDriver, but looks like a hacky solution