Login
You're viewing the ruby.social public feed.

Replies

  • Nov 9, 2026, 8:05 PM

    @janl I want to say, every time I've ever worked with graphql at scale from the backend, what we always eventually did was back into a REST API with extra steps by capturing all the common queries over time and freezing those into server-side persisted queries that could be especially optimized. Production apps were forbidden from calling anything else. So the conversation just got moved to log files and rube goldberg machines.

    💬 4🔄 7⭐ 57
  • 💬 0🔄 0⭐ 9
  • Nov 9, 2026, 11:04 PM
    @lmorchard @janl am i missing something or does that allow developing an app and backend without spending time asking for new apis every time you need something different, but organically working out what data is useful over time? of course the *final state* is less optimal than replacing the query system with fixed routes, but it's useful for DRY (don't need to change multiple endpoints when you want different info) and managing coordination overhead during development

    (it's also possible that different apps *don't* converge to a shared data model, but your mention suggests that's not a concern in your observation)
    💬 1🔄 0⭐ 0
  • Nov 9, 2026, 11:06 PM

    @lmorchard @janl ah the qrt mentions

    it seems almost almost physically impossible not to write horribly slow data access code with this. their example code for getting associated objects is an N+1 query. they acknowledge this elsewhere and go “there exist solutions to this, uh, elsewhere”

    hmm yeah that would be a problem, but it’s a distant enough post he’s not even tagged anymore

    💬 1🔄 0⭐ 0
  • Nov 10, 2026, 2:23 AM

    @nyanpasu64 @lmorchard @janl It seemed like the solution for the N+1 problem was part of GraphQL's claim to fame by batching load operations into a single query, as seen in webonyx.github.io/graphql-php/ and referenced as "DataLoader" on graphql.org/learn/performance/

    Without that pattern built into the server implementation of resolvers ... Yeah, it's going to go downhill very quickly.

    💬 1🔄 0⭐ 1
  • 💬 0🔄 0⭐ 0
  • Nov 9, 2026, 11:25 PM

    @nyanpasu64 @janl Well, the problem wasn't so much that we could work out what's necessary organically over time

    It's that, before even trying to launch to production, we had to capture what the app did. And then try to freeze those queries as an ad hoc API spec, then optimize those queries. And then hope that that ended up matching real user traffic, once launched

    It was like time needed to be spent chasing down new APIs every time - but instead of asking or planning, it was a detective story

    💬 1🔄 0⭐ 5
  • Nov 9, 2026, 11:27 PM

    @nyanpasu64 @janl The alternative - i.e. just allowing the sort of organic, free-form query ability that GraphQL promises in production - led to endless N+1 queries, self-DoS attacks, and service outage nightmares :blobsweats:

    💬 2🔄 1⭐ 5
  • 💬 1🔄 0⭐ 0
  • Nov 10, 2026, 12:50 AM

    @nyanpasu64 @janl Yeah, it's pretty impractical. These days, the actual GraphQL usage is often abstracted away through several layers of auto-magic that assembles the queries from app components at runtime

    💬 0🔄 0⭐ 2
  • 💬 0🔄 0⭐ 0
  • Nov 10, 2026, 4:14 AM

    @lmorchard @janl I'm really glad to hear someone else verbalise this. I never really used GraphQL in any serious way, but just looking at it, I was always struck by how this basically breaks any form of caching. The proponents would say that you could cache and parameterise certain queries... and that's exactly what a normal REST API is...

    💬 0🔄 0⭐ 4
  • Nov 10, 2026, 7:33 AM

    @lmorchard @janl the one time I’ve used GQL was exactly like this, and the other times someone brought it up, everyone said “it’ll be exactly like this” 🤷‍♂️ Which is annoying, because the basic idea of “let’s use types a bit” seems pretty great, but “at the same time as letting clients define queries” probably isn’t.

    💬 1🔄 0⭐ 2
  • Nov 10, 2026, 4:48 PM

    @benjohn @lmorchard @janl : GraphQL is a way of enabling external applications to do ad-hoc queries against your production operational database.

    We don't see any problems with letting just anyone (mostly outside of our control) do arbitrary practically unlimited ad-hoc queries, live, against our production operational database, in the middle of active operations, do we?

    Nawwww …

    🙄

    💬 1🔄 0⭐ 2
  • 💬 0🔄 0⭐ 2
  • 💬 1🔄 0⭐ 3
  • 💬 0🔄 0⭐ 5
  • 💬 3🔄 0⭐ 2
  • Nov 9, 2026, 8:20 PM

    @ewolff that depends. I observe that in my experience devs not talking to each other unilaterally creates negative consequences and the opposite almost always improves things. I further observe that nobody but FB has FB’s frontend and backend teams, so the technology is not designed for use anywhere else.

    💬 2🔄 0⭐ 21
  • 💬 0🔄 0⭐ 0
  • 💬 0🔄 0⭐ 3
  • 💬 0🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0
  • Nov 9, 2026, 8:17 PM

    @janl On my level of abstraction, GraphQL is indistinguishable from SQL. Therefore it turns a REST backend into a database. 🤷‍♂️

    💬 3🔄 1⭐ 7
  • Nov 9, 2026, 8:21 PM

    @ewolff with random permutations of SQL being dog slow because of 1+N patterns and missing or wrongly used indexes, sure. Is that a bad thing? ;D

    💬 1🔄 0⭐ 5
  • 💬 1🔄 0⭐ 1
  • 💬 1🔄 0⭐ 11
  • 💬 1🔄 0⭐ 0
  • 💬 0🔄 0⭐ 4
  • 💬 0🔄 0⭐ 3
  • Nov 10, 2026, 5:20 AM

    @ewolff @janl What's funny for my exposure to GraphQL is that it's part of a Django app so the backend is a PostgreSQL database anyway, it ends up being an inscrutable boondoggle compared to the relative simplicity of using the corresponding REST API or even writing your own SQL.

    I've tried writing a few queries over the years and I waste a morning, don't get the results I want and I don't end up learning much as its abstraction doesn't make sense to me. I guess it makes sense to Facebook frontend devs.

    💬 0🔄 0⭐ 0
  • Nov 9, 2026, 8:30 PM

    @janl Sometimes that’s a very useful feature. And of course it is self-documenting. Something “REST” APIs (most of which are not RESTful) are lacking.

    💬 1🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0
  • Nov 9, 2026, 9:02 PM

    @janl So it’s a technical “solution” for a social problem (Facebook doesn’t give it’s dev teams time to talk to and support other)

    💬 0🔄 0⭐ 3
  • Nov 9, 2026, 9:05 PM

    @janl That is entirely in keeping with what I've heard of Facebook engineering. If you use it to take full advantage of it, you end up with a security nightmare, and if you lock it down enough to fix it, you've spent more time than you would have building APIs in the first place. All the effort to build tooling there probably could have more usefully gone to more fluid APIs.

    💬 1🔄 1⭐ 9
  • Nov 9, 2026, 10:25 PM

    @dymaxion or to recruiting and training people for communication and collaboration skills.

    But god forbid SV entertain a non-technical solution for human interaction dilemmas. 🤷

    💬 1🔄 0⭐ 5
  • 💬 0🔄 0⭐ 2
  • 💬 1🔄 0⭐ 1
  • Nov 9, 2026, 11:13 PM

    @xgebi @janl Why would swagger be out of date? It's usually built from the models themselves, that's the point isn't it?

    💬 1🔄 0⭐ 0
  • 💬 1🔄 0⭐ 0
  • Nov 10, 2026, 8:13 AM

    @xgebi @janl That sounds like the team is just bad at making decisions.

    Using swagger is a decision to make openapi.yaml your authoritative source of truth for the API schema. If you choose to manually update it you have decided to move the test for correctness of that truth to some other place, be it team communication, a test or a CI pipeline job.

    None of that is an argument for graphql which just pushes the same issues down to the db schema instead.

    💬 1🔄 0⭐ 0
  • Nov 10, 2026, 8:51 AM

    @bbuk I’m fully aware that it’s not the best practice 🙃 I’m aware of the communication dysfunctions. At the same time I’m not arguing for GraphQL.

    I’m arguing for Death Glares toward backend devs who don’t keep their swaggers up to date 😈

    💬 1🔄 0⭐ 1
  • 💬 0🔄 0⭐ 1
  • Nov 9, 2026, 9:19 PM

    @janl the sad part is, despite this being entirely anecdotal it's such a consistent explanation that we have no reason to doubt it

    💬 0🔄 0⭐ 0
  • Nov 9, 2026, 9:26 PM

    @janl All technologies are a solution to some organisational problem. And there are benefits of not having to speak to people, for example very large distributed teams.

    💬 2🔄 0⭐ 2
  • Nov 9, 2026, 10:40 PM

    @freiksenet @janl In the broadest, most abstract sense, yes. However this is about as specific and useful a sentiment as saying "technology is when computers do things."

    While I'm sure there are advantages to not having to communicate with other teams these advantages are often overshadowed by the dysfunction created by teams being siloed off from each other. This is how you get teams duplicating work or creating tech stacks that work against each other.

    💬 0🔄 1⭐ 1
  • 💬 1🔄 0⭐ 1
  • Nov 10, 2026, 6:20 AM

    @freiksenet @Sandrockcstm I have yet to see where folks working on the same thing not talking to each other is somehow advantageous.

    Yes we need clear boundaries and the database inplementation people probably fontend devs, but they will wanna talk to the storage and networking people around them e.g.

    💬 1🔄 0⭐ 1
  • Nov 10, 2026, 7:15 AM

    @janl @Sandrockcstm My point is that sometimes you don't have power to solve organization, but you have power to write software. I'm not surprised GraphQL is from Facebook.

    💬 1🔄 0⭐ 2
  • 💬 1🔄 0⭐ 0
  • 💬 1🔄 0⭐ 2
  • 💬 1🔄 0⭐ 2
  • 💬 1🔄 0⭐ 1
  • 💬 1🔄 0⭐ 0
  • Nov 10, 2026, 8:22 AM

    @janl @Sandrockcstm I am yet to see a single big corporation with functioning communication. It is probably why we shouldnt have big corporations, but that's beyond the point.

    💬 0🔄 0⭐ 1
  • 💬 0🔄 0⭐ 4
  • Nov 9, 2026, 9:59 PM

    @janl This makes me sad because I've used GQL as a way to force frontend and backend developers to sit down together to design features in a schema file first, avoiding the typical hand-wavy "stuff happens", then each built implementations based off that.

    N+1 wasn't a problem because we built query batching into every resolver.

    It replaced multiple REST endpoints to fetch subsets of the same data based on search, list, view, preview(a), or preview(b), often w/subtle unnecessary differences.

    💬 0🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0