Why GraphQl is broken?

Rohan Mahajan
Sep 7, 2018 · 1 min read

As mentioned here, GraphQl greatly improves client-server development. However, the interaction between the server and the resolvers is broken. GraphQl is backend agnostic and lets developers define their own resolvers. Most GraphQl layers have become pass-through layers for some sort of data storage such as databases. Building tools for these specific integrations of these data storage elements into GraphQl will greatly improve efficiency. First, the GraphQl schema is redundant with database schema. Tools should automatically create a database based on the GraphQl schema or create the GraphQl schema based on databases. AWS AppSync allows you to do this with Dynamo DB.

Furthermore, individual GraphQl queries can be pretty complicated and call multiple resolvers. This can lead to multiple roundtrips between the server and the database. Furthermore, if the database knew the entire query beforehand, it could make further optimizations. Instead, we need tools to compile GraphQl queries into sql and send that to the database.

What value does the graphql server provide? Should graphql support just be added to databases?

Rohan Mahajan

Written by

Software Engineer. BS/MS from MIT EECS. rohanmahajan1993@gmail.com https://twitter.com/rohanmahajanmit