graphqurl icon indicating copy to clipboard operation
graphqurl copied to clipboard

remove apollo client from the library

Open wawhal opened this issue 5 years ago • 6 comments

graphqurl uses apollo-client underneath to make queries and subscriptions. Apollo client is actually unnecessary for this use case. This library can be more performant and lightweight if we remove the apollo-client and simply use node-fetch for queries and mutations and isomorphic-ws for subscriptions.

Checklist:

  • [ ] Use node-fetch for HTTP calls
  • [ ] Use isomorphic-ws for subscriptions.

wawhal avatar Oct 04 '18 08:10 wawhal

Can I call dibs on this @wawhal?

sashman avatar Oct 04 '18 08:10 sashman

Sure @sashman :-)

wawhal avatar Oct 04 '18 08:10 wawhal

Just an update on progress here https://github.com/hasura/graphqurl/pull/30

Websocket side is still to be done

sashman avatar Oct 05 '18 13:10 sashman

Might need a bit of help with replacing subscription handling in utils.js. I've been looking at how apollo handles subscriptions and it seems fairly in depth. Are you sure you'd like to bring this complexity into graphqurl? Please correct me if I'm wrong though, I'm might be going down the wrong rabbit hole here...

sashman avatar Oct 05 '18 23:10 sashman

@sashman sorry for the late reply.

Yes that is how it needs to be done. You have to handle all websocket events separately.

wawhal avatar Oct 08 '18 05:10 wawhal

wondering whether the scope of this issue is affected by the https://github.com/hasura/graphqurl/pull/63

mushkevych avatar May 13 '21 20:05 mushkevych