News for hackers. Stuff that matters.
Re:Show HN: GraphQL Client in the Terminal by smlavine on Saturday June 04, 2022 @05:11PM (#31625115)
Go programmers may also be interested in this project:

https://git.sr.ht/~emersion/gqlclient

Which could be used to write a similar program.

Re:Show HN: GraphQL Client in the Terminal by hleszek on Saturday June 04, 2022 @05:34PM (#31625314)
For subscriptions, you could use graphql-python/gql (https://github.com/graphql-python/gql) as a dependency instead of requests and graphql-core directly and support the websockets transport.
Re:Show HN: GraphQL Client in the Terminal by metadat on Saturday June 04, 2022 @04:26PM (#31624709)
(This is implemented in Python)

Would love to see a Rust port as a reference for how Rustaceans would achieve comparable functionality, curious what the tradeoffs would be (complexity and LoC).

Re:Show HN: GraphQL Client in the Terminal by datalopers on Saturday June 04, 2022 @06:19PM (#31625647)
It issues HTTP requests and provides a small terminal UI. Why does the language possibly matter?
Re:Show HN: GraphQL Client in the Terminal by imran-iq on Saturday June 04, 2022 @06:36PM (#31625774)
A good example would be curlie (go frontend for curl - https://github.com/rs/curlie) vs httpie (pure python - https://github.com/httpie/httpie). Originally I used httpie for its easier syntax, but it is very noticeably slower than curlie. I presume this is why they are asking for a rust version.

Another reason is that python is a bit harder to distribute due to the nature of python packaging, where as rust compiles to a single binary.

Re:Show HN: GraphQL Client in the Terminal by pdimitar on Saturday June 04, 2022 @10:35PM (#31627435)
I want a single binary executable file. Doing `pip install` didn't work 19 out of 20 times I attempted it.
Re:Show HN: GraphQL Client in the Terminal by monocasa on Saturday June 04, 2022 @06:34PM (#31625764)
> as a reference for how Rustaceans would achieve comparable functionality
Re:Show HN: GraphQL Client in the Terminal by RedShift1 on Saturday June 04, 2022 @05:33PM (#31625308)
Cool!
Re:Show HN: GraphQL Client in the Terminal by nothingisconvex on Saturday June 04, 2022 @05:03PM (#31625040)
Why is the better than cURL?
Re:Show HN: GraphQL Client in the Terminal by codefreakxff on Saturday June 04, 2022 @05:27PM (#31625260)
It is an interactive query builder that understands the schema, and lets you arrow between fields and input values.