GraphQL across the stack: How everything fits together

In this talk, I talk about a future for GraphQL which builds on the idea that GraphQL enables lots of tools to work together seamlessly across the stack. I present this through the lens of 3 examples: Caching, performance tracing, and schema stitching.

12.
The GraphQL Query:
A unit of data fetching
1. Send all of the requirements for a
unit of your UI in one request
2. Server can analyze and optimize
the entire query at once
3. Reduce backend fetches by
batching and caching per-request

13.
Some of the main questions we hear:
1. CACHING
Load less data and save
resources
2. TRANSPARENCY
Understand what's
happening
3. MODULARITY
Combine parts into a
seamless whole

15.
Tradeoffs: GraphQL and caching
● HTTP caching often doesn't
support POST requests, long keys
● Greater request diversity
● GraphQL is transport independent
● Automatically fine-grained cache
control
● Declare it alongside your schema
and resolvers
Current approaches become harder to use, but there are opportunities for next
generation features that leverage GraphQL specifically.

28.
Cache control in a GraphQL-focused way
Just like backend fetching, cache control is coupled to
the nature of the data, so it should be defined in the
schema and resolvers.
The final caching behavior you get depends on what data
was required by the client, and can be controlled by
changing the query.

29.
Idea 1:
We can build on GraphQL's
core advantages and
expand them.

30.
Caching in the API and the client
Most people use a caching
GraphQL client library.
If we're already specifying
cache controls for our
gateway, the same info can
be used for the client to
expire data.

42.
The ecosystem of tools for GraphQL
GraphQL spec is robust and
useful enough to spawn
thousands of companion tools
for every imaginable platform
Let's continue to expand on
those capabilities by building on
specified community standards

48.
Jason Lengstorf, IBM
We needed a way to let multiple teams
create, test, and maintain GraphQL data
sources in isolation, but ultimately expose
them all as part of the same /graphql
endpoint on our platform.
ibm.biz/gramps-graphql
Abhi Aiyer, Workpop
We set out to work on a solution that would
combine our graphql services into one
schema. This allows the client to query APIs
across the system without worrying about
the address of any given downstream service.
apollographql.com/docs/graphql-tools/
schema-stitching.html
GraphQL Join by APIs.guru
https://blog.apis.guru/graphql-join-or-how-to-find-all-bars-a
round-graphql-summit-with-a-single-query-e2ebfe27c67c

61.
Taking GraphQL to
its full potential.
That's what we're all about.
Find me on Twitter/Medium/GitHub
@stubailo
Our newly relaunched site and docs
apollographql.com
Let's all build the future of GraphQL together!
apollographql.com/#slack
github.com/apollographql