www.nickolinger.com
The joys and pains of working with GraphQL
This quickly becomes burdensome when you add new resources to the application; however, this same burden is also a feature. The application is self-documenting and it's easy to understand the entrypoints into an application that's being exposed via HTTP/HTTPS. In a large, complex GraphQL applicaton tracking down how clients query the API requires more energy than you would like. There's a lot of engineering discipline required to keep your GraphQL API from turning itself into a REST-like API as a product changes. In the first GraphQL query above, … There are many cases where you might already have a piece of data available from a database query and you would like to "return early," as we've done here but GraphQL makes your pay a tax of sorts for the flexibility it offers. This tax, in large code bases, can grow and become cumbersome. The non-linear nature of dealing with graphs has left me wanting some sort of GUI representation of the graph that lights up as a request moves through each resolver. Was REST so bad that we need to make understanding how our requests are routed more difficult?
Related Pain Points3件
Difficulty tracking client queries in large GraphQL applications
6In large, complex GraphQL applications, tracking how clients query the API is burdensome and requires significant engineering effort. Maintaining consistency and preventing the API from devolving into a REST-like structure as the product evolves demands considerable discipline.
GraphQL steep learning curve and debugging complexity
5GraphQL has a significant learning curve compared to REST APIs. Developers must learn schema definitions, resolvers, and query structures, and debugging is more complex. Studies show developers find GraphQL challenging and time-consuming to learn with limited knowledge-base resources.
Limited observability tooling for GraphQL request tracing
5Developers lack adequate GUI tools for visualizing how requests move through GraphQL resolvers. Understanding request routing and resolver execution flow is more difficult than with simpler protocols, creating a gap in observability.