Building GraphQL-native Microservices

By @ryanchenkie on October 25, 2017


Who is Johannes

  • Based in Berlin and San Francisco
  • Background in Node, Rust, Swift, Go
  • Built a VR company in the past

GraphQL Open Source Tooling

Graphcool has a number of open source projects, including arguably the smallest GraphQL client out there, a CLI tool, and a GraphQL Playground which is a more feature-complete explorer for GraphQL.

johannes-1

The Power of GraphQL

Johannes found that Firebase, Parse, and other BaaS offerings were too limited. That's when he set out to offer a hosted backend for GraphQL. Part of the mission was to help people learn about the various libraries that are part of the GraphQL ecosystem, including Relay and Apollo.

The Graphcool team has more than 50k services handling more than 1,000 requests per second. The recent growth has been staggering.

johannes-2

Insights about GraphQL Servers

GraphQL is typically known as an API gateway technology and this has made it incredibly popular. This has shifted the community's thinking that they should approach server implementations on a GraphQL-first basis.

Things become even more powerful when you can take multiple GraphQL schemas and stitch them together. This kind of "schema stitching" unlocks a lot of powerful possibilities and is a very exciting area.

GraphQL Servers from Scratch

Creating your own GraphQL server is done by creating schemas and resolvers. Pretty much every language and technology has an offering to make it possible to create GraphQL servers.

Although you can build a server in any technology, there are a lot of details that need to be implemented that are outside the scope and concern of the GraphQL spec. This includes items like filtering, pagination, authentication and authorization.

johannes-3

Why Start Graphcool?

Graphcool started as a means to have better building blocks for creating GraphQL servers.

While it is easy to get started with Graphcool with a nice user interface, the team has received a lot of feedback from users that they would like to have a way to interact with it more programmatically. Users were also concerned with potential vendor lock-in.

As of today, Graphcool has been open-sourced as a framework to meet these needs.

Graphcool Framework Details

The Graphcool framework comes with everything you need to create GraphQL servers, including tools for handling authentication and authorization, pagination, filtering, and more.

The framework currently uses MySQL for storage with support for PostgreSQL on the way. The goal is to be totally technology-agnostic.

The Graphcool Framework architecture is simple at its core: you have a CRUD API with a database which you call into from your client. In addition, it comes with an event gateway so that you can use functions on AWS Lambda.

The architecture can be deployed on your own cloud or on-premise with Docker or Kubernetes.

johannes-4