News for hackers. Stuff that matters.
Re:Ask HN: How has GraphQL panned out for your organization? by speedgoose on Saturday September 11, 2021 @12:56AM (#28489527)
I currently work on a project using GraphQL from the start and we are happy with this choice. It's sometimes a bit complex but when I listen to some friends debating about how to build the most beautiful RESTful API for their use case, I don't regret GraphQL at all.

We have some queries that are a bit slow because it's easy to ask a lot in GraphQL, but the alternative would be to do hundreds of HTTP queries if we were using REST for example.

The tooling is particularly good nowadays. My company use it in NodeJS with Apollo and TypeScript and it's very good and stable. I also did some side projects in Rust and it was very pleasing to use too.

One common problem is the caching, you can't easily cache using normal HTTP CDN software for example, but since our API requires to be authenticated for anything, it's not a problem for us. We just do cache in other places.

We have some simpler API not using GraphQL but I would strongly recommend GraphQL as soon as your API is not tiny.

Re:Ask HN: How has GraphQL panned out for your organization? by jayy-lmao on Saturday September 11, 2021 @04:14AM (#28490290)
That sounds a lot like our experience. We use GraphQL as a gateway to like 20 different rest endpoints. Places where we have hammered an underlying endpoint are _usually_ places where we would have done so from the client or SSR instead. We do also have all these talking within an internal network which is a huge help.

Have also done Rust and really enjoyed GQL in it, both as hobby and "innovation projects" at work. Feels good.

WRT CDN Caching: Akamai has a pretty good GraphQL caching module that can also do POST requests. Cache directives are marvellous. I'd like to see explore the "private" directive to see if it disables certain queries from being cached.

Re:Ask HN: How has GraphQL panned out for your organization? by jayy-lmao on Saturday September 11, 2021 @04:17AM (#28490297)
Oh and also: If you use typescript in the frontend GQL codegen is super simple to set up and can type all your queries