There are two main ways of using GraphQL:

  1. as the core method of defining & accessing APIs
  2. as an alternative way of accessing existing APIs (a proxy)

The original idea here is not about the technical way of doing it as it is pretty standard.

I focus on a specific context where this idea may become very interesting:

A Central GraphQL for Big Organizations is a tool that allows to aggregate everyone on a common format while preserving the diversity of the ecosystem, with a very limited risk, and with “free documentation” as a bonus.

It may also be a solution for smaller organizations as the secret is to only involve a small team or even one person to bootstrap the project.

Important steps

  1. choose a way of defining contracts
    • You can choose to write in the GraphQL definition format directly, in protobuf and then generate the GraphQL code, probably even in swagger, etc
  2. implement (at least) two different services using this format
  3. bootstrap a PoC implementing the two services, you may have to develop some “drivers” for common feature: authentication, retry policy etc
  4. show your PoC to some other key people (architects, team leaders, etc.)
  5. motivate people to help you write missing API specifications and “drivers”
  6. profit!

Conclusion