GraphQLSwift / GraphQL

The Swift GraphQL implementation for macOS and Linux
MIT License
939 stars 72 forks source link

client library #137

Open rex-remind101 opened 11 months ago

rex-remind101 commented 11 months ago

following up from https://github.com/GraphQLSwift/GraphQL/issues/55#issuecomment-1868135784 and hoping to start a conversation about how a client library might function. cc @paulofaria

xtremekforever commented 1 week ago

I actually spent some time writing a small client library for my work project and I've been thinking about how this could be done in a more "reusable" way for more to use. AsyncHTTPClient can be used for doing requests to a GraphQL endpoint that runs HTTP, and something like Hummingbird's WebSocketClient can be used for the WebSocket GraphQL implementation. All of this could be quite simple to implement I think if we leverage this GraphQL library for all the types that are needed.

NeedleInAJayStack commented 1 week ago

Awesome thoughts! I'm definitely interested in a server-side compatible client library too! Let me know if you want someone to bounce ideas off of or if you want to contribute it to the GraphQLSwift org.