Open remorses opened 4 years ago
Maybe we can remove rxjs
altogether? The rxjs dependency is used just for this line (exclduing the map operator that can be easily removed)
https://github.com/helios1138/graphql-typed-client/blob/b616fe82725417d378a6be64e23f6b9f3ced5ace/src/client/getSubscriptionCreator.ts#L18
From what i understand this code maintains the connection open for multiple subscribers, isn't this already implemented in subscriptions-transport-ws
?
Currently the bundle size is pretty big because of lodash and rxjs https://bundlephobia.com/result?p=graphql-typed-client@1.7.4
Lodash impact can be reduced simply by changing the import paths, rxjs instead requires the consumer tree shaking the library to reduce bundle size
To enable tree shaking this library should expose a module version of the lib and generate the entry point code with the import syntax instead of require, this way Webpack can tree shake the unused rxjs operators