×
Copy
Open
Link
Embed
Share
Beginning
This slide
Copy link URL
Copy link URL
Copy iframe embed code
Copy iframe embed code
Copy javascript embed code
Copy javascript embed code
Share
Tweet
Share
Tweet
Slide 1
Slide 1 text
Evolving the Graph GraphQL Conf 2019
Slide 2
Slide 2 text
jon wong @jnwng developer experience
Slide 3
Slide 3 text
No content
Slide 4
Slide 4 text
we envision a world where anyone, anywhere can transform their life by accessing the world’s best learning experience.
Slide 5
Slide 5 text
(p.s., we're hiring in mountain view and toronto)
Slide 6
Slide 6 text
Evolving the Graph GraphQL Conf 2019
Slide 7
Slide 7 text
No content
Slide 8
Slide 8 text
Evolving Our Graph GraphQL Conf 2019
Slide 9
Slide 9 text
DISCLAIMER Take everything beyond with a large Coursera- sized grain of salt. What works for our team may not work for yours.
Slide 10
Slide 10 text
Coursera has been using GraphQL for over three years!
Slide 11
Slide 11 text
GraphQL Three Years Ago We wanted a "data-first" solution to reflect our REST APIs in GraphQL
Slide 12
Slide 12 text
GraphQL Three Years Ago Clients were responsible for calling for the correct data for themselves.
Slide 13
Slide 13 text
The Tools (three years ago)
Slide 14
Slide 14 text
Federation
Slide 15
Slide 15 text
Code-first Schema Generation
Slide 16
Slide 16 text
Schema Stitching
Slide 17
Slide 17 text
Lessons Learned (three years later)
Slide 18
Slide 18 text
Federation
Slide 19
Slide 19 text
Federation meant teams could retain ownership over their services.
Slide 20
Slide 20 text
Federation with REST meant we only had one GraphQL resolver
Slide 21
Slide 21 text
Federation with REST meant you previewed changes in production.
Slide 22
Slide 22 text
Code-first Schema Generation
Slide 23
Slide 23 text
Code Generation It was really simple to get existing REST resources into our schema.
Slide 24
Slide 24 text
Code Generation It was really simple to get existing REST resources into our schema.
Slide 25
Slide 25 text
Code Generation ~ 7,546 types ~ 664 root fields
Slide 26
Slide 26 text
Schema Stitching
Slide 27
Slide 27 text
Schema Stitching Namespacing our types gave our graph room to grow. We have ~600+ distinct REST resources.
Slide 28
Slide 28 text
Schema Stitching We never had to figure out how to "deprecate" a field
Slide 29
Slide 29 text
Some things surprised us.
Slide 30
Slide 30 text
GraphQL clients are incredibly powerful For every feature our servers didn't have, our clients could add support.
Slide 31
Slide 31 text
Our implementation of GraphQL didn't look like GraphQL in the wild.
Slide 32
Slide 32 text
Our Biggest Realization
Slide 33
Slide 33 text
Is a data-first schema the best use of GraphQL?
Slide 34
Slide 34 text
The schema of your service is not always the same as the schema you want for your client.
Slide 35
Slide 35 text
No content
Slide 36
Slide 36 text
No content
Slide 37
Slide 37 text
Clients don't just need data, they need information.
Slide 38
Slide 38 text
Where We Go From Here
Slide 39
Slide 39 text
Optimizing for quality of schema over quantity of schema.
Slide 40
Slide 40 text
Coordination between engineers happens with GraphQL schemas as our common language.
Slide 41
Slide 41 text
We're vastly more intentional about what goes into the schema.
Slide 42
Slide 42 text
The graph doesn't evolve, people do.
Slide 43
Slide 43 text
Thanks! @jnwng