Why, after 6 years, I'm over GraphQL

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • connect-es

    The TypeScript implementation of Connect: Protobuf RPC that works.

    Someone above recommended https://connectrpc.com/ , which looks quite promising to me. Maybe I'll get time to play with it today

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • react-relay

    Relay is a JavaScript framework for building data-driven React applications.

  • typespec

    “the main thing your frontend devs like about GraphQL is its self documenting type safe nature”

    I’ve been saying this for years: fetching multiple things in one query is not something normal-scale apps care about. What devs like about it is client generation and type safety. So OpenAPI, for all its flaws, covers that. GraphQL’s schema language is much more beautiful — hopefully Microsoft’s TypeSpec will take off and we can have the best of both worlds.

    https://typespec.io/

  • React

    The library for web and native user interfaces.

    You know you can just check before making these claims?

    > In fact, for years, react didn't even tell in the doc you could use it without a transpiler so people had to learn a whole build chain before even getting to the hello world.

    React's original documentation site from June of 2013 (when React was first introduced):

    https://web.archive.org/web/20130607085014/http://facebook.g...

    Feel free to click around that original documentation site.

    Here's the README.md from the commit at the same time:

    https://github.com/facebook/react/tree/a41aa76ef36471ba07b29...

    > You'll notice that we used an XML-like syntax; we call it JSX. JSX is not required to use React, but it makes code more readable, and writing it feels like writing HTML. A simple transform is included with React that allows converting JSX into native JavaScript for browsers to digest.

    At this point I would kindly ask you to go away.

  • swagger-petstore

    It may not be an exact analog, but "swagger UI" for openapi is the best I've seen like GraphiQL. Example https://petstore.swagger.io/ . Not sure of other alternatives.

    No analog for "subgraph federation systems", unless a load balancer will suffice.

  • json5

    JSON5 — JSON for Humans

    There are a lot of proponents that some or all of the "JSON5" [1] improvements should be standardized by ECMA as well. Especially because there is a mish-mash of support for such things in some but not all parsers. (Writers are a different matter.) Primarily comments and trailing commas, are huge wish list items and the biggest reasons for all of the other "many" variant parsers (JSONC, etc).

    [1] https://json5.org/

  • HashQL

    I will, once again, bring your attention to hashql, which is so pleasant to use. It's so minimal that it is almost more a pattern than a library. Try it out as an alternative to graphql if you are mainly querying a SQL database anyhow (although it can be easily configured to request data from other types of sources.) I don't think it can currently combine results from multiple data sources, but I think it should be within the realm of possible things

    https://github.com/porsager/HashQL

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  • Phoenix

    Peace of mind from prototype to production

    > I seem to recall Meta/Facebook engineers on HN having said they have a tool that allows engineers to author SQL or ORM-like queries on the frontend and close to where the data is used, but a compiler or post-processor turns that into an endpoint.

    I don't know about on-HackerNews but there's a discussion about their "all of Facebook optimizing compiler" infrastructure from when they did the site redesign in 2020: https://engineering.fb.com/2020/05/08/web/facebook-redesign/...

    > perhaps not coincidentally, React introduced "server actions" as a mechanism that is very similar to [the above]

    Yep - there's also the Scala framework LiftWeb (https://www.liftweb.net/), the Elixir framework Phoenix (https://www.phoenixframework.org/) and of course the system we're using right now (Arc) that do similar things. Scaling these kinds of UUID-addressed-closures is harder (because the client sessions have to be sticky unless you can serialize closures and send them across the network between servers).

  • webrpc

    webrpc is a schema-driven approach to writing backend services for modern Web apps and networks

    another project to take a look at for schema-driven approach to writing backend services and fully code-generated clients: https://github.com/webrpc/webrpc

    it's similar to OpenAPI, but its simpler, and cleaner. In fact, you can generate webrpc schema's to OpenAPI and then generate OpenAPI clients.

  • saasufy-components

    Components for Saasufy

    This is a great write-up. I was already aware of most of the drawbacks that the author wrote about in the early days of GraphQL... But nobody would listen to me. Another category of solutions which was ignored completely is CRUD with field-granularity over WebSockets.

    I've built platform which does just that: https://saasufy.com/

    This approach has allowed me to create a library of highly generic components which can be composed into surprisingly complex front ends and where all data updates in real time (in a targeted, efficient and scalable way): https://github.com/Saasufy/saasufy-components?tab=readme-ov-...

    It would have been impossible to do this with GraphQL because field-granularity is essential. GraphQL queries combine different resources and fields together and this makes it impossible to avoid real time update conflicts.

  • yates

    Use Postgres RLS with Prisma

    All good points! We built Yates (https://github.com/cerebruminc/yates) to solve the authz problem.

    Yates implements Postgres RLS on top of Prisma, which we use as our ORM, and then our GraphQL schema is generated using TypeGraphQL (https://typegraphql.com/). Overall, it's a very nice setup and allows us to be versatile on the client side while still having strong authentication integrity.

  • TypeGraphQL

    Create GraphQL schema and resolvers with TypeScript, using classes and decorators!

    All good points! We built Yates (https://github.com/cerebruminc/yates) to solve the authz problem.

    Yates implements Postgres RLS on top of Prisma, which we use as our ORM, and then our GraphQL schema is generated using TypeGraphQL (https://typegraphql.com/). Overall, it's a very nice setup and allows us to be versatile on the client side while still having strong authentication integrity.

  • Json.NET

    Json.NET is a popular high-performance JSON framework for .NET

    In my opinion, the single biggest issue with Newtonsoft.Json is https://github.com/JamesNK/Newtonsoft.Json/issues/862.

    Sure, you can disable it, but the fact that it is opt-out to begin with - i.e. that by default the parser will try to creatively interpret any string it sees in JSON input and convert in a locale-specific manner that also quietly loses data - is, frankly, insane through and through. I've personally run into this issue many times in existing code - it usually happens when people first start using the library and just never run into any inputs that would trigger this behavior while testing. Then once that code is shipped, someone somewhere just happens to have the data that triggers it.

    And if you look at the comments to that issue, there are numerous mentions from other GitHub repos due to bugs it caused for them, including some Microsoft projects.

    The cherry on that cake was author's response indicating that he doesn't even understand why this design is problematic in the first place: "I like what it does, I have no plans to change it, and I would do it again if given the chance." I wouldn't trust any parser written with this kind of attitude.

  • pydantic-resolve

    progressively extend and resolve your schema

  • openapi-ts

    ✨ Turn your OpenAPI specification into a beautiful TypeScript client

    different tool for different aspect.

    using OPENAPI, rpc, GQL types in client, etc to share typing (schema) information between client/server

    resolver/dataloader in GQL, eager join in ORM is to handler internal data composition

    presenter layer should not care about data composition, so that writing Query at presenter is an anti-pattern.

    presenter should fetch schema info & data passively, like what https://github.com/hey-api/openapi-ts did, the job of implementation belongs to backend.

    In fact what rest/rpc really need is the resolver and dataloader, to help backend easily extend or composing data together, and immediately transferring the schema & data to clients.

    pydantic-resolve is the python binding for this idea.

  • drf-flex-fields

    Dynamically set fields and expand nested resources in Django REST Framework serializers.

    If anyone is reading this and is using Django there is a smooth transition to drf-flex-fields. The package gives GraphQL-like features while using REST.

    - https://github.com/rsinger86/drf-flex-fields

    - https://django.wtf/blog/graphql-like-features-in-django-rest...

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • dprint: Pluggable and configurable code formatting platform written in Rust

    1 project | news.ycombinator.com | 15 Jun 2024
  • My opinion about opinionated Prettier: 👎

    3 projects | dev.to | 2 May 2024
  • TypeSpec: A New Language for API-Centric Development

    11 projects | news.ycombinator.com | 29 Apr 2024
  • OpenAPI-TypeScript – OpenAPI schemas in TypeScript

    1 project | news.ycombinator.com | 24 Nov 2023
  • Gentle Introduction To Typescript Compiler API

    6 projects | dev.to | 18 Nov 2023

Did you konow that TypeScript is
the 2nd most popular programming language
based on number of metions?