apollosolutions / federation-subscription-tools

A set of demonstration utilities to facilitate GraphQL subscription usage alongside a federated data graph
MIT License
106 stars 34 forks source link

Update graphql lib version #28

Open Oxyaction opened 2 years ago

Oxyaction commented 2 years ago

Starting from ^2.0.0 version ApolloGateway uses graphql ^16.0.0 version as a dependency. It produces a version conflict error since federation-subscription-tools still using graphql version 15.

Error: Cannot use GraphQLInputObjectType "{ ...schema }" from another module or realm.

Ensure that there is only one instance of "graphql" in the node_modules
directory. If different versions of "graphql" are the dependencies of other
relied on modules, use "resolutions" to ensure only one version is installed.

Can you update the dependency?

paulbijancoch commented 2 years ago

or could we do it by ourselves?

alexandra-c commented 1 year ago

Hello, You can check out my implementation here https://www.npmjs.com/package/@totalsoft/federation-subscription-tools I forked @Oxyaction 's also forked repo (😁), upgraded almost everything that needed upgrade to make it work with GraphQL v16 and Apollo Federation v2. Enjoy!

PS: I'm still waiting and hoping Apollo guys will soon integrate subscription into Apollo Federation 2 and support them natively 🙏.