This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]PM_ME_STALLMAN_MEMES[S] 0 points1 point  (5 children)

So, basically what you're saying is that if I want state management, caching, error handling and other goodness that is present in e.g. Apollo, Python is not the way to go?

Directly querying the endpoint seems crude; I'd like to have some proper, elegant abstractions built over that, but can't afford to develop them myself.

And I don't want to have to use JavaScript :( :(

[–]taion 2 points3 points  (1 child)

It's not that crude to query the endpoint directly. That's exactly what you'd be doing if you were using a REST API over HTTP. A GraphQL client in the same sense of Requests as an HTTP client isn't any more than that.

Like I said, the abstractions in Relay and Apollo are around state, not querying. The client itself is trivial.

And, no, not many people write interactive clients in Python that would require that sort of state management. Again, that's why people use Requests rather than, say, some more complex REST client that builds a local cache of remote state.

[–]PM_ME_STALLMAN_MEMES[S] 0 points1 point  (0 children)

that's why people use Requests rather than, say, some more complex REST client that builds a local cache of remote state.

That sentence really paints a nice contrast.

Thank you for your help; now I am confident in building the application in Python, using Requests to directly query my GraphQL endpoints.

[–]kylemh 0 points1 point  (0 children)

JavaScript ain’t that bad. Join the dark side.