Do we need GraphQL?
GraphQL is a tool, not a silver bullet. And each tool is useful for its category of tasks.
You need GraphQL if:
- models are constantly evolving and the number of fields is growing;
- there is an interaction between the backend and the frontend, which is supposed to have a state manager;
- you need static typing on the frontend according to the server data schema;
- there is much different entity (models), there are many connections between them and the client needs their aggregations (LEFT JOIN) and in one HTTP request.
You don't need GraphQL if:
- there is a work with files or other binary data;
- authentication if there is oidc and/or oauth2;
- CRDT and multiuser editing;
- there is active inter-server communication requiring speed, memory, and/or traffic.
But what if we fall into both categories? Make two, three APIs on different technologies. Any API is a facade in front of services and models. Writing them is not so labor-consuming if your business logic is placed on your abstraction layer and different API implementations reuse it.
GraphQL rockstar, developer of Internet products, OSS maintainer. Since 2001 Pavel's main specialization is web technologies. He has extensive practical knowledge on backend/frontend development, administration, and architecture. Since the end of 2015, Pavel's main focus is on isomorphic applications. In summer 2016 he began the development of graphql-compose (GraphQL schema generator) in open source.