dart-graphql / graphql_client

GraphQL Client.
https://pub.dartlang.org/packages/graphql_client
MIT License
78 stars 9 forks source link

Support for none http clients #21

Open asafigan opened 6 years ago

asafigan commented 6 years ago

GraphQL doesn't have to be served over http. In Apollo, they have abstracted the network client away, while providing a default implementation. This is great for things like testing, support for subscriptions over websockets, or any other customization the user wants to make without having to support it in this library.

I would like this abstraction so that I could build a graphql server in dart to act as a proxy to the real graphql server. I would store all mutations while off network and handle them in dart, then next time the network is back online, I would send all of them to the real server.

I don't think this library should be responsible for this kind of functionality, so I think the network abstraction would be the best option.

stevenolay commented 5 years ago

@asafigan What solution have to come up with so far? My team is thinking about using this as is for the HTTP stuff and building a seperate solution for websockets.

asafigan commented 5 years ago

@stevenolay I have decided to not use dart in my project. Sorry I can't give you any suggestions.