helios1138 / graphql-typed-client

A tool that generates a strongly typed client library for any GraphQL endpoint. The client allows writing GraphQL queries as plain JS objects (with type safety, awesome code completion experience, custom scalar type mapping, type guards and more)
MIT License
212 stars 18 forks source link

replace ws with isomorphic-ws for subscription in browser #33

Closed michelepra closed 3 years ago

michelepra commented 4 years ago

When build for browser ws module must not be taken

https://github.com/helios1138/graphql-typed-client/blob/0bdd5736fc071ae09131852038216738bceb7215/package.json#L72

"isomorphic-ws": "^4.0.1"

https://github.com/helios1138/graphql-typed-client/blob/0bdd5736fc071ae09131852038216738bceb7215/src/client/getSubscriptionCreator.ts#L4

import ws from "isomorphic-ws";

michelepra commented 3 years ago

no chance

IceBlizz6 commented 3 years ago

@michelepra The maintainer is probably gone. But the issue is still relevant, and thanks to you we got an easy fix on our local fork. So for whatever it's worth... thanks!