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
@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!
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";