Frodo Baggins but with Federated GraphQL

Wait, what?

jukben

Jakub Beneš Staff Engineer at Productboard » jukben.codes » @jukben » AMA later

Agenda » GraphQL and why we have chosen it » GraphQL Federation in nutshell » What we did and how we did it

Who knows GraphQL?

GraphQL in 180 seconds

Query language

Strongly typed » Nullable by default » Default scalars: Int, Float, String, Boolean, ID » Enums, Interfaces, Directives » https://spec.graphql.org/

You get what you ask for

Non-breaking changes

DX

Productboard’s Reasons

» YouTube

Federated GraphQL

Apollo Federation » https://www.apollographql.com/docs/federation/ federation-spec » Introduces a few of directives like: @key, @sharable to instruct Gateway how to do query planning.

Query planning

Our Implementation

Frontend

Backend » https://netflix.github.io/dgs/ built on top of Spring Boot » https://graphql-ruby.org » Server needs to follow Federation Spec and Global ID and Pagination spec

Federation » decided to go with managed Federation by Apollo Studio » schema registry with schema checking

Observability: Service

Observability: APM

Observability: Breaking changes

Morphing aka how to roll it out

The Ring

Fellowship @huvik @lukas_krecan @balvajs

Problem and Solution proposal

Transparent (over)communication

Make it fun

In numbers » We started in Q4 2021 » First product use-cases early this year » Now we have 8 subgraphs connected » 33 queries, 38 mutations, 150 types » 500 RPM in peak

Recap » Federated GraphQL is good especially if you want to iterate fast in distributed way » It’s easier to run big thing if you name it » Big changes requires patience

Thank you!

Resources » Pretty Glonky » Apollo Federation » Relay and Relay’s Global ID spec and Relay’s Pagination spec » DGS » GraphQL Ruby » Production Ready GraphQL