Introducing GraphQL to Microservice Architecture: A Case for Splitting Queries and Mutations into Separate Services

Image for post
Image for post
Photo by Pankaj Patel on Unsplash

Abstract

Introduction

Image for post
Image for post
A simple example of a system exposing its complexity and architecture

API Gateways

GraphQL

Image for post
Image for post

Transferring GET requests to GraphQL was easy and elegant. Suddenly 20 microservices were exposed into one, easy to understand object.

Mutations

Splitting the Monolith

Image for post
Image for post
query user {
email
posts {
body
}
}
mutation createPost(input:{…}) {
body
}

Software Architect

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store