Live data from Hacker News

After 6 years, I'm over GraphQL

bessey.dev

641–650 of 721 posts

Re: After 6 years, I'm over GraphQL

#641

Earlier quoted context omitted.

The options we have today are not the options we had at the time Facebook introduced React. React solved tons of browser shortcomings that are finally being fixed in the actual browser.

I don't think that's true, web components are not equivalent to libraries like react and vue.

Web components are approximately where react was in 2014. Which is pretty usable.

Re: After 6 years, I'm over GraphQL

#642
post #160

Earlier quoted context omitted.

I'm not pretending anything and I hate XML. I would still rather use it than HL7, because it's a hierarchical tree of data and HL7 is not. OP's point is that almost nobody wants to use XML anymore; my point is that almost nobody wants a Ford Model T as their daily driver anymore either, and yet it was still the future, in a certain sense.

Do you think FHIR is acceptable? It feels like a cross between JSON and HL7 to me.

I quite like FHIR. My experience with using it has been that everyone seems to implement it slightly differently, but it does a better job at being human-readable. It was much easier for us and our partners to work with than regular HL7.

Some things were a bit weird. From memory it had big lists of records all mixed together as the implementation of references.

Re: After 6 years, I'm over GraphQL

#643
post #196

Earlier quoted context omitted.

Unpopular opinion: I'm actually a fan of singe page specific endpoints. You get much easier debugging, easier to audit security, easier performance optimization an the imho pretty small price to pay is that it's "not elegant" and a bit of backend code

Sounds good in theory. In practice, what I've seen is people don't just do single page endpoints with shared services, they follow this all the way down into the services and so you end up with lots of duplicate looking code. This isn't a problem until the application gets big enough and now you have business logic that should be the same spread out across an app. This leads to weird bugs where something that should…

> In practice, what I've seen is people don't just do single page endpoints with shared services, they follow this all the way down into the services and so you end up with lots of duplicate looking code

There is no easy or simple or final solution. The solution is to do the hard work of software engineering and catch this stuff at code review time or to plan and do refactoring later when you realize something needs normalization. I wish developers would just accept that software engineering is hard and do the hard work necessary.

There's that whole "the best software engineer is lazy because he will automate stuff", but that does not give anyone a license to automate stuff in an unmaintainable way. Automating stuff is hard and there is no easy way out.

Re: After 6 years, I'm over GraphQL

#644

I bought into the hype and I feel bad for the company where I implemented it. One true endpoint to rule them all and cause endless headaches in the process. With most tech that I screw up I assume that "I wasn't using it right" but with GraphQL I'm not sure how anyone could. The permissions/auth aspect alone is a nightmare. Couple that with potential performance issues (N+1 or just massive amounts of data) and I want…

One of the things that really burned me out over the years is how many times I would say something to the effect of "Maybe using GraphQL is over complicating the process and we should just use the old tried and true methods" and I would get drowned out by everyone chasing the latest thing or derided for not wanting to try something new. "Maybe implementing CORBA for message passing is over complicating it." "Maybe us…

This is an eternal struggle for either senior or self-assured developers, convincing others to rein in their enthusiasm / hype. Plus, extroverts (loudmouths) vs introverts (who are correct, but refuse to play the extrovert's game).

Re: After 6 years, I'm over GraphQL

#645

Earlier quoted context omitted.

Mongo is great if you want a distributed replicated log. Existing tools sorely lack. (Postgres and Kafka are broken by design.)

Curious as to why you think Kafka is broken by design?

1. No reliable way to delete already processed entries.

2. No reliable way to handle queue overflow.

Combine both and you are 100% guaranteed to have an incident. (I guess it keeps devops and sysadmins employed, though.)

Re: After 6 years, I'm over GraphQL

#646
post #160

Earlier quoted context omitted.

The problem with XML is precisely that it is so much more than simple hierarchical, nested trees of data. The fact that in a casual conversation XML is reduced to hierarchical trees of data pretending the rest of XML does not exist more than proves OP's point.

I'm not pretending anything and I hate XML. I would still rather use it than HL7, because it's a hierarchical tree of data and HL7 is not. OP's point is that almost nobody wants to use XML anymore; my point is that almost nobody wants a Ford Model T as their daily driver anymore either, and yet it was still the future, in a certain sense.

https://en.wikipedia.org/wiki/Billion_laughs_attack https://en.wikipedia.org/wiki/XML_external_entity_attack

XML is so much more than hierarchical data serialization format. In a typical conversation XML generally means "JSON-compatible subset of XML" as if the other parts do not even exist. Like in the meme "Javascript vs Javascript the good parts".

XML never really took off, only the parts that make up "different flavor of JSON".

Re: After 6 years, I'm over GraphQL

#647
post #61

Earlier quoted context omitted.

> In some ways yes, in others no. For example it can be near impossible to see if a deprecated field in a REST API is still being used and by which clients it is being used. With GraphQL this is fairly simple. You should log deprecation warnings. But also if the client is composing urls/params manually then you are not doing REST, you are doing RPC. Rest APIs should mainly use HATEOAS hyperlinks to obtain a resource.…

REST is just a short name for RPC over JSON. Nobody does real Fielding's REST.

I disagree, REST is still meaningfull even in the usual loosened sense, it still means that you are working with some kind of actions on resources

Re: After 6 years, I'm over GraphQL

#648

Earlier quoted context omitted.

This is why the Rails community should be applauded in my book, for their dogged determination that we should keep it a “one person” framework. Yes it may not be as performant, type safe or flashy on the front end but my god it’s productive. At my startup there are 7 devs who can all do tickets across the stack and as we grow I think it would be good if we could resist the pressure to silo and specialize

> but my god it’s productive. It really is. Regrettably, I've drifted away from it in large part because of client requirements for more "modern" and "maintainable" solutions (e.g. Python or Node; I'll take Python every time, thanks). Django comes very close in terms of productivity (and is better in some ways: auth, admin, etc.) but the Rails CLI, generators and community (not sure if this is still relevant) give it…

There are some Java frameworks that are kinda similar? Take a look at Micronaut for example. It has data access interfaces that use ActiveRecord's naming approach, controllers, view renderers, and a whole lot more on top.

Re: After 6 years, I'm over GraphQL

#649

I bought into the hype and I feel bad for the company where I implemented it. One true endpoint to rule them all and cause endless headaches in the process. With most tech that I screw up I assume that "I wasn't using it right" but with GraphQL I'm not sure how anyone could. The permissions/auth aspect alone is a nightmare. Couple that with potential performance issues (N+1 or just massive amounts of data) and I want…

How many underlying services and clients was the GQL layer catering to? How many different digital products and independent teams? You referred to "the backend team" (one) and did not mention stitching/federation. This makes it likely that you were using GraphQL to address a set of needs that may not be aligned with the goals of GraphQL. Just like the author of the article - it sounds to me like he probably has been working in contexts where he would not have been able to see the org/collab/infra benefits of GraphQL. Much like the case with microservices. Enterprise tech/arch solve more than just technical problems.

Re: After 6 years, I'm over GraphQL

#650
post #311

Earlier quoted context omitted.

GraphQL "solves" the ability to ignore an unneeded field in a response? Revolutionary.

Even in REST, I’m sure you don’t use every field from every request? In fact, such tight coupling between FE and BE in REST is strongly advised against. And “wasted fields” was never a problem graphql was trying to solve.

We are in complete agreement - I was criticizing the implication that it was impossible to ignore fields in a REST response.
Post reply on HN