frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

2002: Last.fm and Audioscrobbler Herald the Social Web

https://cybercultural.com/p/lastfm-audioscrobbler-2002/
46•cdrnsf•52m ago•13 comments

Hashcards: A plain-text spaced repetition system

https://borretti.me/article/hashcards-plain-text-spaced-repetition
181•thomascountz•5h ago•68 comments

Ask HN: What Are You Working On? (December 2025)

80•david927•5h ago•256 comments

JSDoc is TypeScript

https://culi.bearblog.dev/jsdoc-is-typescript/
31•culi•2h ago•38 comments

Do dyslexia fonts work? (2022)

https://www.edutopia.org/article/do-dyslexia-fonts-actually-work/
30•CharlesW•2h ago•26 comments

The Typeframe PX-88 Portable Computing System

https://www.typeframe.net/
77•birdculture•4h ago•20 comments

Developing a food-safe finish for my wooden spoons

https://alinpanaitiu.com/blog/developing-hardwax-oil/
91•alin23•4d ago•45 comments

In the Beginning was the Command Line (1999)

https://web.stanford.edu/class/cs81n/command.txt
40•wseqyrku•6d ago•14 comments

AI and the ironies of automation – Part 2

https://www.ufried.com/blog/ironies_of_ai_2/
187•BinaryIgor•8h ago•74 comments

GraphQL: The enterprise honeymoon is over

https://johnjames.blog/posts/graphql-the-enterprise-honeymoon-is-over
122•johnjames4214•4h ago•94 comments

Shai-Hulud compromised a dev machine and raided GitHub org access: a post-mortem

https://trigger.dev/blog/shai-hulud-postmortem
150•nkko•11h ago•91 comments

Advent of Swift

https://leahneukirchen.org/blog/archive/2025/12/advent-of-swift.html
15•chmaynard•1h ago•4 comments

Disk can lie to you when you write to it

https://blog.canoozie.net/disks-lie-building-a-wal-that-actually-survives/
25•jtregunna•2d ago•13 comments

GNU recutils: Plain text database

https://www.gnu.org/software/recutils/
44•polyrand•2h ago•9 comments

Price of a bot army revealed across online platforms

https://www.cam.ac.uk/stories/price-bot-army-global-index
45•teleforce•5h ago•8 comments

Illuminating the processor core with LLVM-mca

https://abseil.io/fast/99
48•ckennelly•6h ago•4 comments

Standalone Meshtastic Command Center – One HTML File Offline

https://github.com/Jordan-Townsend/Standalone
34•Subtextofficial•5d ago•8 comments

Linux Sandboxes and Fil-C

https://fil-c.org/seccomp
326•pizlonator•22h ago•128 comments

Baumol's Cost Disease

https://en.wikipedia.org/wiki/Baumol_effect
52•drra•9h ago•60 comments

Vacuum Is a Lie: About Your Indexes

https://boringsql.com/posts/vacuum-is-lie/
68•birdculture•8h ago•38 comments

Compiler Engineering in Practice

https://chisophugis.github.io/2025/12/08/compiler-engineering-in-practice-part-1-what-is-a-compil...
90•dhruv3006•14h ago•15 comments

Stop crawling my HTML – use the API

https://shkspr.mobi/blog/2025/12/stop-crawling-my-html-you-dickheads-use-the-api/
100•edent•3h ago•103 comments

iOS 26.2 fixes 20 security vulnerabilities, 2 actively exploited

https://www.macrumors.com/2025/12/12/ios-26-2-security-vulnerabilities/
95•akyuu•5h ago•80 comments

Efficient Basic Coding for the ZX Spectrum (2020)

https://blog.jafma.net/2020/02/24/efficient-basic-coding-for-the-zx-spectrum/
42•rcarmo•9h ago•10 comments

Apple Maps claims it's 29,905 miles away

https://mathstodon.xyz/@dpiponi/115651419771418748
137•ColinWright•8h ago•120 comments

Kimi K2 1T model runs on 2 512GB M3 Ultras

https://twitter.com/awnihannun/status/1943723599971443134
175•jeudesprits•8h ago•88 comments

Using e-ink tablet as monitor for Linux

https://alavi.me/blog/e-ink-tablet-as-monitor-linux/
243•yolkedgeek•5d ago•91 comments

Getting into Public Speaking

https://james.brooks.page/blog/getting-into-public-speaking
87•jbrooksuk•4d ago•33 comments

More atmospheric rivers coming for flooded Washington and the West Coast

https://www.cnn.com/2025/12/12/weather/washington-west-coast-flooding-atmospheric-rivers-climate
34•Bender•3h ago•8 comments

I fed 24 years of my blog posts to a Markov model

https://susam.net/fed-24-years-of-posts-to-markov-model.html
276•zdw•1d ago•111 comments
Open in hackernews

GraphQL: The enterprise honeymoon is over

https://johnjames.blog/posts/graphql-the-enterprise-honeymoon-is-over
120•johnjames4214•4h ago

Comments

gideon60•4h ago
Yup, honeymoon is over. Now is the time for the adult, long-term, and productive relationship.
sibeliuss•4h ago
Exactly! Once its working, it can be very healthy. And especially on the client. For a very, very, very long time. We started using GraphQL at the very beginning, back in 2015, and the way it has scaled over time -- across backend and frontend -- has worked amazingly well. Going on 10 years now and no slowing down.
c-hendricks•3h ago
We haven't been using it as long but it's definitely saved us from things that were "impossible" to associate in our microservice backend.
fcpguru•4h ago
i wrote this a few weeks ago:

https://gist.github.com/andrewarrow/c75c7a3fedda9abb8fd1af14...

400 lines of QL vs one rest DELETE / endpoint

gideon60•4h ago
Feels like a schema design issue? If your REST backend exposes a single path to remove an item, are there any reason why your GraphQL schema doesn't expose a root mutation field taking the same arguments?
fcpguru•3h ago
yeah tell shopify, it's their api!
johnjames4214•3h ago
Exactly. If it's that verbose and painful for a public API like Shopify/GitHub (where the 'flexibility' argument is strongest), it makes even less sense for internal enterprise apps.

We are paying that same complexity tax you described, but without the benefit of needing to support thousands of unknown 3rd-party developers.

n_e•3h ago
The issue is that the API itself is, I assume, badly designed.

Equivalent delete queries in rest / graphql would be

  curl -X DELETE 'https://api.example.com/users/123'
vs

  curl 'https://api.example.com/graphql?query={ deleteUser(id: 123) { id } }'
throwaway613745•3h ago
wut

we have a mixed graphql/REST api at $DAY_JOB and our delete mutations look almost identical to our REST DELETE endpoints.

TFA complains needing to define types (lol), but if you're doing REST endpoints you should be writing some kind of API specification for it (swagger?). So ultimately there isn't much of a difference. However, having your types directly on your schema is nicer than just bolting on a fragile openapi spec that will quickly become outdated when a dev forgets to update it when a parameter is added/removed/changed.

ashishb•53m ago
Generate the open API spec from the backend for internal applications.

No need to update manually. Further, you can prevent breaking changes to the spec using oasdiff

roscue•18m ago
I feel you. But I think this might have more to do with the cursed design of the Shopify order editing API than with GraphQL itself.
websiteapi•3h ago
I tried graphql with hasura and it was pretty neat, but it still just seemed easier to use RPC or REST.
EionRobb•3h ago
The article pretty much sums up why I've been a bigger fan of OData than GraphQL, especially in the business cases. OData will still let you get all those same wins that GraphQL does but without a sql-ish query syntax, and sticking to the REST roots that the web works better with. Also helps that lots of Microsoft services work out of the box with OData.
mansa10•1h ago
in my experience OData has several big issues:

- Overly verbose endpoint & request syntax: $expand, parenthesis and quotes in paths, actions etc.

- Exposes too much filtering control by default, allowing the consumer to do "bad things" on unindexed fields without steering them towards the happy path.

- Bad/lacking open source tooling for portals, mocks, examples, validation versus OpenAPI & graphQL.

It all smells like unpolished MS enterprise crap with only internal MS & SAP adoption TBH.

hn_throwaway_99•3h ago
> The main problem GraphQL tries to solve is overfetching.

My issue with this article is that, as someone who is a GraphQL fan, that is far from what I see as its primary benefit, and so the rest of the article feels like a strawman to me.

TBH I see the biggest benefits of GraphQL are that it (a) forces a much tighter contract around endpoint and object definition with its type system, and (b) schema evolution is much easier than in other API tech.

For the first point, the entire ecosystem guarantees that when a server receives an input object, that object will conform to the type, and similarly, a client receiving a return object is guaranteed to conform to the endpoint response type. Coupled with custom scalar types (e.g. "phone number" types, "email address" types), this can eliminate a whole class of bugs and security issues. Yes, other API tech does something similar, but I find the guarantees are far less "guaranteed" and it's much easier to have errors slip through. Like GraphQL always prunes return objects to just the fields requested, which most other API tech doesn't do, and this can be a really nice security benefit.

When it comes to schema evolution, I've found that adding new fields and deprecating old ones, and especially that new clients only ever have to be concerned with the new fields, is a huge benefit. Again, other API tech allows you to do something like this, but it's much less standardized and requires a lot more work and cognitive load on both the server and client devs.

hjnilsson•3h ago
Agree whole-heartedly. The strong contracts are the #1 reason to use GraphQL.

The other one I would mention is the ability to very easily reuse resolvers in composition, and even federate them. Something that can be very clunky to get right in REST APIs.

verdverm•2h ago
re:#1 Is there a meaningful difference between GraphQl and OpenAPI here?

Composed resolvers are the headache for most and not seen as a net benefit, you can have proxied (federated) subsets of routes in REST, that ain't hard at all

JasonSage•1h ago
> Composed resolvers are the headache for most and not seen as a net benefit, you can have proxied (federated) subsets of routes in REST, that ain't hard at all

Right, so if you take away the resolver composition (this is graph composition and not route federation), you can do the same things with a similar amount of effort in REST. This is no longer a GraphQL vs REST conversation, it's an acknowledgement that if you don't want any of the benefits you won't get any of the benefits.

verdverm•1h ago
There are pros & cons to GraphQL resolver composition, not just benefits.

It is that very compositional graph resolving that makes many see it as overly complex, not as a benefit, but as a detriment. You seem to imply that the benefit is guaranteed and that graph resolving cannot be done within a REST handler, which it can be, but it's much simpler and easier to reason about. I'm still going to go get the same data, but with less complexity and reasoning overhead than using the resolver composition concept from GraphQL.

Is resolver composition really that different from function composition?

8n4vidtmkvmk•2h ago
Pruning the request and even the response is pretty trivial with zod. I wouldn't onboard GQL for that alone.

Not sure about the schema evolution part. Protobufs seem to work great for that.

FootballMuse•2h ago
Pruning a response does nothing since everything still goes across the network
hn_throwaway_99•2h ago
You're misunderstanding. In GraphQL, the server prunes the response object. That is, the resolver method can return a "fat" object, but only the object pruned down to just the requested fields is returned over the wire.

It is an important security benefit, because one common attack vector is to see if you can trick a server method into returning additional privileged data (like detailed error responses).

hdjrudni•1h ago
Pruning the response would help validate your response schema is correct and that is delivering what was promised.

But you're right, if you have version skew and the client is expecting something else then it's not much help.

You could do it client-side so that if the server adds an optional field the client would immediately prune it off. If it removes a field, it could fill it with a default. At a certain point too much skew will still break something, but that's probably what you want anyway.

hn_throwaway_99•2h ago
> Pruning the request and even the response is pretty trivial with zod.

I agree with that, and when I'm in a "typescript only" ecosystem, I've switched to primarily using tRPC vs. GraphQL.

Still, I think people tend to underestimate the value of having such clear contracts and guarantees that GraphQL enforces (not to mention it's whole ecosystem of tools), completely outside of any code you have to write. Yes, you can do your own zod validation, but in a large team as an API evolves and people come and go, having hard, unbreakable lines in the sand (vs. something you have to roll your own, or which is done by convention) is important IMO.

dgan•2h ago
Sorry but not convinced. How is this different from two endpoints communicating through, lets say, protobuf? Both input and output will be (un)parsed only when conforming to the definition
lateforwork•1h ago
If you generate TypeScript types from OpenAPI specs then you get contracts for both directions. There is no problem here for GraphQL to solve.
komali2•1h ago
Discovering Kubb was a game changer for me last year.
HumanOstrich•54m ago
Thanks for mentioning this. I always find it unsettling when I've researched solutions for something and only find a better option from a random HN comment.

Site: https://kubb.dev/

c-hendricks•1h ago
What about the whole "graph" part? Are there any openapi libraries that deal with that?
lateforwork•1h ago
OpenAPI definition includes class hierarchy as well. You can use tools to generate TypeScript type definitions from that.
c-hendricks•57m ago
And the fetching in a single request?
lateforwork•47m ago
The question I answered was regarding contracts. Fetching in a single request can be handled by your BFF.
nisalperi•3h ago
My hot take is that if you’re using GraphQL without Relay, you’re probably not using it to its full potential. I’ve used both Relay and Apollo Client on production, and the difference is stark when the app grows!
rbalicki•26m ago
1000%. There's almost no reason to use GraphQL unless you take advantage of data masking + fragment colocation.
tonyhart7•3h ago
I don't like GraphQL, it feels strange for me (for my rest brain)

despite many Rest flaw that I know that it feels tedious sometimes, I still prefer that

and now with AI that can scaffold most rest. the pain point of rest mostly "gone"

now that people using a lot of Trpc, I wonder can we combine Grpc + rest that essentialy typesafe and client would be guaranteed to understand how model response look ?????

pjmlp•3h ago
I wish, plenty of SaaS their main query API is GraphQL.
trashymctrash•3h ago
What I liked about GraphQL was the fact that I only have to add a field in one place (where it belongs in the schema) and then any client can just query it. No more requests from Frontend developers like „Hey, can you also add that field to this endpoint? Then I don’t have to make multiple requests“. It just cuts that discussion short.

I also really liked that you can create a snapshot of the whole schema for integration test purposes, which makes it very easy to detect breaking changes in the API, e.g. if a nullable field becomes not-nullable.

But I also agree with lots of the points of the article. I guess I am just not super in love with REST. In my experience, REST APIs were often quite messy and inconsistent in comparison to GraphQL. But of course that’s only anecdotal evidence.

matsemann•2h ago
But the first point is also its demise. I have object A, and want to know something from a related object E. Since I can ask for A-B-C-D-E myself, I just do it, even though the performance or spaghettiness takes a hit. Then ends up with frontend that's tightly coupled to the representation at the time as well, when "in the context of A I also need to know E" could've been a specialized type hiding those details.
Culonavirus•1h ago
> No more requests from Frontend developers like „Hey, can you also add that field to this endpoint? Then I don’t have to make multiple requests“.

Do people actually work like this is 2025? I mean sure, I guess when you're having entire teams just for frontends and backends then yea, but your average corporate web app development? It's all full stack these days. It's often expected that you can handle both worlds (client and server) and increasingly its even TypeScript "shared universe" when you don't even leave the TS ecosystem (React w/ something like RR plus TS BFF w/ SQL). This last point, where frontend and backend meet, is clearly the way things are going in general. I mean these days React doesn't even beat around the bush and literally tells you to install it with a framework, no more create-react-app, server side rendering is a staple now and server side components are going to be a core concept of React within a few years tops.

Javascript has conquered the client side of the internet, but not the server side. Typescript is going to unify the two.

gavinray•3h ago
I'm probably about as qualified to talk about GraphQL as anyone on the internet: I started using it in late 2016, back when Apollo was just an alternate client-side state/store library.

The internet at large seems to have a fundamental misunderstanding about what GraphQL is/is not.

Put simply: GQL is an RPC spec that is essentially implemented as a Dict/Key-Value Map on the server, of the form: "Action(Args) -> ResultType"

In a REST API you might have

  app.GET("/user", getUser)
  app.POST("/user", createUser)
In GraphQL, you have a "resolvers" map, like:

  {
    "getUser": getUser,
    "createUser": createUser,
  }
And instead of sending a GET /user request, you send a GET /query with "getUser" as your server action.

The arguments and output shape of your API routes are typed, like in OpenAPI/OData/gRPC.

That's all GraphQL is.

jayd16•2h ago
This seems a bit reductive as it skims over the whole query resolution part entirely.
verdverm•2h ago
Which is where the real complexity comes in
thom•1h ago
This, for me, is a perfect description of the entirety of GraphQL tbh.
ericyd•2h ago
Is this relevant to the posted article? I don't see how the OP misrepresents anything about GQL.
8n4vidtmkvmk•2h ago
I think you're oversimplifying it. You've left on the part where the client can specify which fields they want.
verdverm•2h ago
That's something you should only really do in development, and then cement for production. Having open queries where an attacker can find interesting resolver interactions in production is asking for trouble
hdjrudni•1h ago
Sure, maybe you compile away the query for production but the server still needs to handle all the permutations.
verdverm•1h ago
yup, and while they are fixed, it amounts to a more complicated code flow to reason about compared to you're typical REST handler

Seriously though, you can pretty much map GraphQL queries and resolvers onto JSONSchema and functions however you like. Resolvers are conceptually close to calling a function in a REST handler with more overhead

I suspect the companies that see ROI from GraphQL would have found it with many other options, and it was more likely about rolling out a standard way of doing things

fgkramer•1h ago
But has this been thoroughly documented and are there solid libraries to achieve this?

My understanding is that this is not part of the spec and that the only way to achieve this is to sign/hash documents on clients and server to check for correctness

verdverm•50m ago
Well, it seems that the Apollo way of doing it now, via their paid GraphOS, is backwards of what I learned 8 years ago (there is always more than one way to do things in CS).

At build time, the server generates a random string resolver names that map onto queries, 1-1, fixed, because we know exactly what we need when we are shipping to production.

Clients can only call those random strings with some parameters, the graph is now locked down and the production server only responds to the random string resolver names

Flexibility in dev, restricted in prod

mirekrusin•54m ago
Except you can't have ie. union as argument, which means you can't construct ie. SQL/MongoDB-like where clauses.
andrewingram•52m ago
As someone who’s used GraphQL since mid-2015, if you haven’t used GraphQL with Relay you probably haven’t experienced GraphQL in a way that truly exploits its strengths.

I say probably because in the last ~year Apollo shipped functionality (fragment masking) that brings it closer.

I stand by my oft-repeated statement that I don’t use Relay because I need a React GraphQL client, I use GraphQL because I really want to use Relay.

The irony is that I have a lot of grievances about Relay, it’s just that even with 10 years of alternatives, I still keep coming back to it.

exasperaited•3h ago
I dunno. I still really like Lighthouse (for Laravel).

It's about the only thing about my job I still do like.

The difference is that it is schema-first, so you are describing your API at a level that largely replaces backend-for-frontend stuff. If it's the only interface to your data you have a lot less code to write, and it interfaces beautifully with the query builder.

I tend not to use it in unsecured contexts and I don't know if I would bother with GraphQL more generally, though WP-GraphQL has its advantages.

storafrid•3h ago
A blog post about GraphQL in an enterprise setting, that fails to address the biggest GQL feature for enterprises. Not unlike most material on HN about microservices. Federated supergraph is the killer feature imo.
ericyd•2h ago
The author states that in their experience, most downstream services are REST, so adding a GQL aggregation layer on top isn't very helpful. It seems possible they would have a different opinion if they were working with multiple services that all implemented GQL schemas.
FootballMuse•2h ago
Being able to federate REST alongside GQL has been a value add in my experience. Apollo even has the ability to do this client side
wrs•2h ago
In that (common) case, the advantage is the frontend/app developers don’t need to know what a hot mess of inconsistent legacy REST endpoints the backend is made of, only the GQL layer does. Which also gives you some breathing room to start fixing said mess.
timcobb•3h ago
> The main problem GraphQL tries to solve is overfetching.

this gets repeated over and over again, but if this your take on GraphQL you def shouldn't be using GraphQL, because overfetching is never such a big problem that would warrant using GraphQL.

In my mind, the main problem GraphQL tries to solve is the same "impedance mismatch" that ORMs try to solve. ORM's do this at the data level fetching level in the BE, while GraphQL does this in the client.

I also believe that using GraphQL without a compiler like Relay or some query/schema generation tooling is an anti-pattern. If you're not going to use a compiler/query generation tool, you probably won't get much out of GraphQL either.

In my opinion, GraphQL tooling never panned out enough to make GraphQL worthwhile. Hasura is very cool, but on the client side, there's not much going on... and now with AI programming you can just have your data layers generated bespoke for every application, so there's really no point to GraphQL anymore.

jiggawatts•44m ago
> overfetching is never such a big problem

Wait, what? Overfetching is easily one of the top #3 reasons for the enshittification on the modern web! It's one of the primary causes of incredible slowdowns we've all experienced.

Just go to any slow web app, press F12 and look at the megabytes transferred on the network tab. Copy-paste all text on the screen and save it to a file. Count the kilobytes of "human readable" text, and then divide by the megabytes over the wire to work out the efficiency. For notoriously slow web apps, this is often 0.5% or worse, even if filtering down to API requests only!

rbalicki•22m ago
#1 unnecessary network waterfalls

#2 downloading the same fields multiple times

#3 downloading unneeded data/code

Checks out

rbalicki•23m ago
If you're interested in an example of really good tooling and DevEx for GraphQL, then may I shamelessly promote this video in which I demonstrate the Isograph VSCode extension: https://www.youtube.com/watch?v=6tNWbVOjpQw

TLDR, you get nice features like: if the field you're selecting doesn't exist, the extension will create the field for you (as a client field.) And your entire app is built of client fields that reference each other and eventually bottom out at server fields.

verdverm•3h ago
I have strong agreement here and would add reasoning about auth flow through nested resolvers is one of the biggest challenges because it adds so much mental overhead. The reason is that a resolver may be called through completely different contexts and you have to account for that

The complexity and time lost to thinking is just not worth it, especially once you ship your GarphQL app to production, you are locking down the request fields anyway (or you're keeping yourself open for more pain)

I even wrote a zero-dependency auth helpers package and that was not enough for me to keep at it

https://github.com/verdverm/graphql-autharoo

Like OP says, pretty much everything GraphQL can do, you can do better without GraphQL

cluckindan•1h ago
Have you tried using a decorator for auth?

Also, using a proper GraphQL server and not composing it yourself from primitives is usually beneficial.

verdverm•58m ago
This was an auth extension or plugin for Apollo, forget what they called it.

Apollo shows up in the README and package.json, so I'm not sure why you are assuming I was not using a proper implementation

mohas•2h ago
using graphql specifically Apollo was one of my regrettable decisions when I was designing a system 3 years ago, one that haunts me still today with wired bugs, too much effort to upgrade the version while prev version still have bugs etc. and I lost performance and simplicity of rest on top of that
cluckindan•1h ago
It’s one of the best pieces of software I’ve worked with. I guess simplicity is in the eye of the beholder :)
ramon156•2h ago
I like that Shopify chose GraphQL and I believe their API would've been messier if they kept the REST endpoint.

Maybe I'm missing something, but I think they did well

adsharma•2h ago
It's interesting to see people use the term "GQL" to refer to GraphQL.

https://www.gqlstandards.org/ is an ISO standard. The Graph Database people don't love search engine results when they're looking for something.

I maintain a graph database where support for GQL often comes up.

https://github.com/LadybugDB/ladybug/issues/6

jayd16•2h ago
One interesting conjecture that GQL makes, I think, is that idempotent request caching at the http level is dead... Or at least can't be a load bearing assumption because the downstream can change their query to fetch differently.

Do we think this has turned out to hold? Is caching an API http response of no value in 2025.

be_erik•2h ago
The appeal of GraphQL is that it eliminates the need for a BFF and easily solves service meshing. Over fetching is more of a component design problem than a performance issue.
lateforwork•42m ago
> eliminates the need for a BFF

Does it really? What if you need to store user preferences?

Also, some would say BFF is easier to implement than GraphQL.

aabhay•2h ago
How do GraphQL based systems solve the problem of underlying database thrashing, hot shards, ballooning inner joins, and other standard database issues? What prevents a client from writing some adversarial-level cursed query that causes massive internal state buildup?

I’m not a database neckbeard but I’ve always been confused how GraphQL doesn’t require throwing all systems knowledge about databases out the window

spooneybarger•2h ago
Most servers implement a heuristic for "query cost/complexity" with a configurable max. At the time the query is parsed, its cost is determined based on the heuristic and if it is over the max, the query is rejected.
lll-o-lll•11m ago
Which would be fine for internal facing, but it doesn’t sound like it would be enough in an adversarial context?
ianberdin•2h ago
I hated GraphQL and all the hype around it. Until I finally got how to use it what for.

Same I thought about nest.js, Angular.

All of them hard to understand by heart at beginning, later (a few years), you feel it and get value.

Sounds stupid, but I tried to reimplement all the benefits using class transformers, zod, custom validators, all others packages. And always end up: “alright, graphql does this out of the box”.

REST is nice, same as express.js if you create non-production code. Reality is you need to love this boilerplate. AI writes this anyway.

ianberdin•2h ago
Is it user friendly for all the apps. It’s not. Is it easy to understand? No. For beginners? No. For legacy corps? No. For public APIs? No.
hashmap•2h ago
> GraphQL isn’t bad. It’s just niche. And you probably don’t need it.

> Especially if your architecture already solved the problem it was designed for.

What I need is to not want to fall over dead. REST makes me want to fall over dead.

> error handling is harder than it needs to be GraphQL error responses are… weird. > Simple errors are easier to reason about than elegant ones.

Is this a common sentiment? Looking at a garbled mash of linux or whatever tells me a lot more than "500 sorry"

I'm only trying out GraphQL for the first time right now cause I'm new with frontend stuff, but from life on the backend having a whole class of problems, where you can have the server and client agree on what to ask for and what you'll get, be compiled away is so nice. I don't actually know if there's something better than GraphQL for that, but I wish when people wrote blogs like this they'd fill them with more "try these things instead for that problem" than simply "this thing isn't as good as you think it is you probably don't need it".

Dibes•1h ago
If isomorphic TS is your cup of tea, tRPC is a nicer version of client server contracting than graphql in my opinion. Both serve that problem quite well though.
greekrich92•2h ago
Over a decade of web dev experience and constantly lurking on HN, I've never heard the initialism BFF. What is a Backend for Frontend and where did that term gain traction?
storus•2h ago
I thought that the main selling point of GraphQL was a single query per SPP argument, i.e. fetch your app state with a single query at the beginning instead of waiting for hundreds of REST calls. This also goes out of the window when you need to do some nested cursor stuff though, i.e. open app with third page selected, and inside the page have the second table on the 747th row selected.
akio•1h ago
If all your experience comes from Apollo Client and Apollo Server, as the author's does, then your opinion is more about Apollo than it is about GraphQL.

You should be using Relay[0] or Isograph[1] on the frontend, and Pothos[2] on the backend (if using Node), to truly experience the benefits of GraphQL.

[0]: https://relay.dev/

[1]: https://isograph.dev/

[2]: https://pothos-graphql.dev/

cluckindan•1h ago
There are also GraphQL interfaces for various databases which can be useful, especially with federation to tie them together into a supergraph.
cluckindan•1h ago
There is a pattern where GraphQL really shines: using a GraphQL native DB like Dgraph (self-hosting) and integrating other services via GraphQL Federation in a GraphQL BFF.
sheepscreek•1h ago
What I’ve realized over time is the idea is beautiful and the problem it solves is partly of API/schema discovery.

Yet I am conflicted on whether it’s a real value add for most use-cases though. Maybe if there are many micro-services and you need a nice way to tie it all together. Or the underlying DB (source or truth data stores) can natively support responses in GraphQL. Then you could wrap it in a thin API transformation BFF (backend for frontend) per client and call it a day.

But in most cases, you’re just shifting the complexity + introducing more moving parts. With some discipline and standardization (if all services follow the same authentication mechanics), it is possible to get the same benefits with OpenAPI + an API catalog. Plus you avoid the layers of GraphQL transformations in clients and the server.

100% based on my anecdotal experience supporting new projects and migrations to GraphQL in < $10B market cap companies (including a couple of startups).

bg_tagas•1h ago
GraphQL is one of those solutions in need of a problem for most people. People want to use it. But they have no need for it. The number of companies who need it could probably be counted on both hands. But people try to shoehorn it into everything.
gethly•1h ago
GQL was always one of those things that sound good on the surface but in practice it never delivers and the longer you're stuck with it the worse it gets. Majority of tech is actually like this. People constantly want to reinvent the wheel but in the end, a wheel is a wheel and it will never be anything else.
ashishb•56m ago
Same experience here.

Post-honeymoon, I returned to REST+Open API

https://ashishb.net/programming/openapi/

p2detar•56m ago
We have a BFF and were considering for a while to go with GQL but eventually scrapped the idea: it seemed like a lot of work on the BE side.

But, we are quite constraint on resources, so now even the BFF seems to consume more and more BE development time. Now we are considering letting the FE use some sort of bridge to the BE's db layer in order to directly CRUD what it needs and therefore skip the BFF API. That db layer already has all sorts of validations in place. Because the BE is Java and the FE is js, it seems the only usable bridge here would be gRPC. Does anyone have any other ideas or has done anything in this direction?

rbalicki•32m ago
The author is missing the #1 benefit of GraphQL: the ability to compose (the data for) your UI from smaller parts.

This is not surprising: Apollo only recently added support for data masking and fragment colocation, but it has been a feature of Relay for eternity.

See https://www.youtube.com/watch?v=lhVGdErZuN4 for the benefits of this approach:

- you can make changes to subcomponents without worrying about affecting the behavior of any other subcomponent,

- the query is auto-generated based on the fragment, so you don't have to worry that removing a field (if you stop using it one subcomponent) will accidentally break another subcomponent

In the author's case, they (either) don't care about overfetching (i.e. they avoid removing fields from the GraphQL query), or they're at a scale where only a small number of engineers touch the codebase. (But imagine a shared component, like a user avatar. Imagine it stopped using the email field. How many BFFs would have to be modified to stop fetching the email field? And how much research must go into determining whether any other reachable subcomponent used that email field?)

If moving fast without overhead isn't a priority (or you're not at the scale where it is a problem), or you're not using a tool that leverages GraphQL to enable this speed, then indeed, GraphQL seems like a bad investment! Because it is!

roscue•28m ago
I would agree that REST beats GraphQL in most cases regarding complexity, development time, security, and maintainability if the backend and frontend are developed within the same organization.

However, I think GraphQL really shines when the backend and frontend are developed by different organizations.

I can only speak from my experience with Shopify's GraphQL APIs. From a client-side development perspective, being able to navigate and use the extensive and (admittedly sometimes over-)complex Shopify APIs through GraphQL schemas and having everything correctly typed on the client side is a godsend.

Just imagining offering the same amount of functionality for a multitude of clients through a REST API seems painful.

loxs•11m ago
It depends very much on the language/server you are using. In Rust, IMO GraphQL is still the best, easiest and fastest way to have my Rust types propagated to the frontend(s) and making sure that I will have strict and maitainable contracts throughout the whole system. This is achieved via the "async_graphql" crate which allows you to define/generate the GraphQL schema in code, by implementing the field handlers.

If you are using something which requires you to write the GraphQL schema manually and then adapt both the server and the client... it's a completely different experience and not that pleasant at all.

nmilo•8m ago
This doesn’t really make sense. Obviously if you combine GQL with BFF/REST you’re gonna have annoying double-work —- you’re solving the same problem twice. GQL lets you structure your backend into semantic objects then have the frontend do whatever it wants without extra backend changes. Which lets frontend devs move way faster.
FrustratedMonky•7m ago
I get the impression that GraphQL only got popular because it was backed by behemoth Facebook.

But the other graph query language "Cypher" always seemed a lot more intuitive to me.

Are they really trying to solve such different problems? Cypher seems much more flexible.