News for hackers. Stuff that matters.
Re:GraphQL is quickly moving to one of my least favorite tec... by eurasiantiger on Friday July 29, 2022 @11:23AM (#32278131)
A lot of FUD around GraphQL these days.

Seems this particular twitterer made the mistake of trying to implement their own GraphQL server from the ground up. Never do that! There are ready-made servers with neat resolver patterns which allow you to respond to queries with well defined entities while fetching their fields from any source.

That said, never do that, either! There are ready-made GraphQL adapters available for pretty much any database, and there are some very promising ”GraphQL-native” databases out there too!

And then there is Prisma, which is a one-stop shop for all your app’s GraphQL needs, whatever the database.

Re:GraphQL is quickly moving to one of my least favorite tec... by justanorherhack on Friday July 29, 2022 @12:51PM (#32279241)
The ready made servers often don’t handle authorization well or at all. Prisma is just an orm. This reads like somebody who hasn’t built a lot of prod stuff.
Re:GraphQL is quickly moving to one of my least favorite tec... by eurasiantiger on Friday July 29, 2022 @03:15PM (#32280726)
As someone who has indeed built production GraphQL backends, creating your own @auth directive visitor is not that difficult of a task. :)
Re:GraphQL is quickly moving to one of my least favorite tec... by asplake on Friday July 29, 2022 @12:26PM (#32278941)
I don’t know, but maybe that particular twitterer – Armin Ronacher no less – had his reasons for trying?
Re:GraphQL is quickly moving to one of my least favorite tec... by eurasiantiger on Friday July 29, 2022 @03:23PM (#32280811)
I don’t doubt that at all! However, I do not consider domain experts authority figures, however omniscient or infallible they may present. On the contrary, given how easily expertise distorts perception of knowledge, I find it prudent to avoid putting expert opinions on a pedestal, and to provide complementary views where possible.
Re:GraphQL is quickly moving to one of my least favorite tec... by UncleEntity on Friday July 29, 2022 @12:54PM (#32279270)
How many ready-made servers are there that aren’t in JavaScript?

I’ve looked a couple times and didn’t find anything.

Re:GraphQL is quickly moving to one of my least favorite tec... by mdaniel on Friday July 29, 2022 @01:10PM (#32279459)
I guess that depends on one's definition of "ready-made"

DGS isn't a terrible place to start, if you're already in the Spring ecosystem https://github.com/Netflix/dgs-framework#readme

There's an "awesome" list in the graphql-java org, too: https://github.com/graphql-java/awesome-graphql-java#readme

Re:GraphQL is quickly moving to one of my least favorite tec... by eurasiantiger on Friday July 29, 2022 @03:29PM (#32280864)
Here’s a list neatly curated for compatibility with Apollo Federation, so you can be sure that your API is composable:

https://www.apollographql.com/docs/federation/supported-subg...

Re:GraphQL is quickly moving to one of my least favorite tec... by brap on Friday July 29, 2022 @12:23PM (#32278907)
Isn't Prisma just a SQL ORM that you use on the server?
Re:GraphQL is quickly moving to one of my least favorite tec... by the_mitsuhiko on Friday July 29, 2022 @01:19PM (#32279573)
Prisma is also an interesting case as it used to be queried via GraphQL but now they use their own query language. It’s still quite useful to build GraphQL based APIs though.