graphqurl
graphqurl copied to clipboard
remove apollo client from the library
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.
Can I call dibs on this @wawhal?
Sure @sashman :-)
Just an update on progress here https://github.com/hasura/graphqurl/pull/30
Websocket side is still to be done
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 sorry for the late reply.
Yes that is how it needs to be done. You have to handle all websocket events separately.
wondering whether the scope of this issue is affected by the https://github.com/hasura/graphqurl/pull/63