graphql-editor / graphql-zeus

GraphQL client and GraphQL code generator with GraphQL autocomplete library generation ⚡⚡⚡ for browser,nodejs and react native ( apollo compatible )
https://graphqleditor.com/docs/zeus
MIT License
1.95k stars 106 forks source link

Add flag to generate cross platform Typescript #365

Open BlueSialia opened 1 year ago

BlueSialia commented 1 year ago

Currently the Client Library Generator creates a client for browser by default, but with the --node flag we can create a client for NodeJS.

I've noticed the only difference between them is that the client for node imports node-fetch and ws.

Would it be possible to have a flag, say --isomorphic, that will produce a client that imports isomorphic-fetch (or cross-fetch) and isomorphic-ws?

I want to use the Zeus client in both platforms and I currently add those imports manually everytime I generate the client.

aexol commented 1 year ago

of course