
GraphQL at Scale - Panel Discussion
FAQ
GraphQL at Scale refers to the capability of GraphQL technology to handle scalability across various dimensions such as technical scalability (managing larger technical loads), product scalability (handling more products or product variability), and team scalability (expanding teams in size, geography, skills, etc.).
GraphQL can significantly influence scalability by allowing flexible and efficient data interaction, which can adapt as the requirements of different clients and products evolve over time. This flexibility supports the scaling of clients that change over time without requiring constant versioning or server changes.
Notable contributors include Dan Schaefer, a co-creator of GraphQL and Facebook Engineering Director, Nick Schrock, also a co-creator and founder of Elemental, and Tanmay Gopal, CEO of Hasura, who focuses on technologies like React, GraphQL, and Kubernetes.
Apollo Federation allows different teams or lines of business to maintain autonomy while contributing to a unified GraphQL schema. This approach helps manage and scale complex systems by defining how different parts of a schema relate to each other, supporting a cohesive yet flexible architecture.
Handling errors in GraphQL is complex due to its nature of potentially returning partial data along with errors. This behavior is different from traditional APIs that use standard HTTP status codes, making it challenging to integrate with existing monitoring tools that rely on these codes.
GraphQL enables a healthier interaction between server-side and client-side engineers by allowing server-side engineers to publish a schema that client-side engineers can consume. This setup promotes a clear separation of concerns and efficient collaboration across different roles.
1. Introduction to GraphQL at Scale
Today, we are here to host a panel on GraphQL at scale. GraphQL can have a profound effect on how you scale in various ways. We have gathered top minds on GraphQL to discuss different ways to scale GraphQL. Let me introduce our panelists: Dan Schafer, GraphQL co-creator and Facebook engineering director; Danielle Mann, engineering and design manager at Apollo; Nick Schrock, GraphQL co-creator and founder of Elemental; and Tanmay Gopal, CEO and co-founder of Hasura. They have extensive experience in various technologies. Now, let's dive into the discussion!
It's good to be here. I hope you're all doing well. It's been an insane conference so far and it's been so much fun to watch from the sidelines, but it's my pleasure today to be here with all of you to host this panel on GraphQL at scale.
But first and foremost, what do I mean about GraphQL at scale? I mean, scale can be a lot of different things, right? There's technical scalability, so accommodating a larger technical load. There's product scalability, accommodating more products or more product variability. There's team scalability. There's expanding your team in a variety of different ways, whether that be geography or size or so on, so forth, skill sets and so on, so forth. I mean, there's a whole lot more ways to scale than what I've even just mentioned just now. And in fact, I was speaking to Uri before the conference and he told me, Taz, if you start to scale up your hair, just like Uri's hair, I can start to understand GraphQL a bit better. Well, I tried and I still don't get it. I still don't get it, Uri. So, I'm afraid that one doesn't work so well. So, you got to give me another tip, man, because that one's not working out so well. But anyway, for me, what I've found is that GraphQL can have a pretty profound effect on how you scale. The technology decision itself can affect how you scale in all those different ways that I mentioned, and we've managed to get some of the top minds on GraphQL from across the entire galaxy here for you today to talk to you about different ways you can scale GraphQL.
So, without further ado, it's my sincere pleasure to introduce you to our panelists. So, Metin already introduced them, but I'll take another stab at it in introduce everyone again. So, first and foremost, Dan Schafer, if I can ask you to give a little wave, Dan. He's the GraphQL co-creator, Facebook engineering director. We have Danielle Mann, engineering and design manager, helping build things for GraphQL at Apollo, currently working on the Apollo Explorer. You get a wave, Danielle. Nick Schrock, the GraphQL co-creator, founder of Elemental, working on Daxter, ex-Facebook engineer. Gonna get a wave, Nick. And last, but certainly not least, Tanmay Gopal, CEO and co-founder of Hasura. He is a stack overflow powered full stack developer's area of interest and work span React, GraphQL, Node.js, Docker, Postgres, and Kubernetes. He is passionate about making it easy to build complex things, and is the instructor of India's largest massive open source online course, The Introduction to Modern Application Development, with over 250,000 students. Can we get a wave, Tanmay?
And I think maybe my first question, how do you remember all those names? I mean, I can remember like three names, but 250,000 names, that must be a really long attendance session at the beginning of all your lessons. That's a lot of people. Yep, yep. Just the online nature of the course really helps with that.
2. GraphQL at Scale: Challenges and Solutions
GraphQL is inherently a technology of scale. It was formulated at Facebook to address the challenges of scaling their data layer. The ability to scale within a given client and add features without versioning the server is one of the original scaling factors of GraphQL. GraphQL provides a formalism for technology teams to interact and handle scale. It offers technical aspects like fragments, type safety, and batching, but also addresses the organizational human problem of scale by providing a way to specify and exchange information about APIs.
That's awesome, dude. Well, it's a pleasure to meet you all. And it's a pleasure to talk to you all about GraphQL at scale. So I guess, without further ado, let's kick it off with a question.
So as I mentioned before, I think GraphQL is inherently a technology of scale. I believe it was formulated at Facebook when scaling their data layer to accommodate multiple device form factors. So what aspects of GraphQL drew you to it when addressing those types of challenges of scale? I guess we can start with Dan.
Yeah, I think the way in which it scales is sort of interesting, because it scaled differently over time, sort of in its evolutions at Facebook. Where the original problem of scale, I think we anticipated the need for multiple clients, but it wasn't even multiple clients at the same time. It was actually the scaling of clients that change over time, where we knew that the newsfeed that we wanted to ship in, the original proto version of the native Facebook app in February 2012, was going to be different than April, was going to be different than June. Just the speed of evolution was going to change. And so it obviously has proved very helpful in having multiple clients at once, but even just scaling within a given client, the ability for a client engineer to say, hey, I'm going to add this feature now, and they don't have to version a server. They don't have to potentially make a server change if the data's already there because of the graph nature of it. I think that was probably one of the original scaling factors that I think didn't necessarily draw us to it, but drew us to create it.
I think one of the things that drew me to GraphQL, especially from the scale aspect, was I think especially over the last few years from what I've seen in the ecosystem is that there's two aspects to scale that are particularly important with GraphQL. The first is this technical aspect, which is that your technology team is scaling and there's a bunch of work that you're doing that is going to be repeated across all of these engineers. Whether they're consuming the API or building the API and whatnot. And GraphQL really creates a formalism for people to interact when they hit those levels of scale. You realize that, Oh, well, we need to have something like fragments, but then turns out when GraphQL has it, you need to have type safety and GraphQL has it as spec. So those technical aspects, so you realize that you're making multiple API calls, you should just be making a better batch API call, and GraphQL is in a way this amazing batching technology. And so that aspect is exciting for sure. But I think there's another very interesting aspect of GraphQL at scale. And I see this, especially in enterprise with what really appeals to people about GraphQL, is not so much the technical awesomeness of what GraphQL lets you do, which is let's say performance and type safety. Okay. To a degree, maybe type safety, but also not the performance aspect of it and whatnot, but more the metadata aspect of it, which is that this aspect of saying that we have this ability, or we have this formal way or this way of specifying our API and exchanging information about our API. And this is more of an organizational human problem of scale rather than the technical aspect of scale, which is saying that we should have really just done this right the first time. We should have had APIs, we should have documented them, we should have had open API specs or whatever. It should have been better, but it's not. And for them, the appeal of GraphQL is, oh finally, yes, this makes sense. We should have this Explorer tool, GraphQL.
Check out more articles and videos
We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career
Workshops on related topic


Table of contents:
- Kick-off and Svelte introduction
- Initialise frontend project
- Tour of the SvelteKit skeleton project
- Configure backend project
- Query Data with GraphQL
- Fetching data to the frontend with GraphQL
- Styling
- Svelte directives
- Routing in SvelteKit
- Endpoints in SvelteKit
- Deploying to Netlify
- Navigation
- Mutations in GraphCMS
- Sending GraphQL Mutations via SvelteKit
- Q&A

Table of contentsPart 1 - Hour 1 a. Relational Database Data Modeling b. Comparing Relational and NoSQL Databases c. GraphQL with the Database in mindPart 2 - Hour 2 a. Designing Relational Data Models b. Relationship, Building MultijoinsTables c. GraphQL & Relational Data Modeling Query Complexities
Prerequisites a. Data modeling tool. The trainer will be using dbdiagram b. Postgres, albeit no need to install this locally, as I'll be using a Postgres Dicker image, from Docker Hub for all examples c. Hasura

Some of the things you'll learn:- Generating a pristine Nx workspace- Generating frontend React apps and backend APIs inside your workspace, with pre-configured proxies- Creating shared libs for re-using code- Generating new routed components with all the routes pre-configured by Nx and ready to go- How to organize code in a monorepo- Easily move libs around your folder structure- Creating Storybook stories and e2e Cypress tests for your components
Table of contents: - Lab 1 - Generate an empty workspace- Lab 2 - Generate a React app- Lab 3 - Executors- Lab 3.1 - Migrations- Lab 4 - Generate a component lib- Lab 5 - Generate a utility lib- Lab 6 - Generate a route lib- Lab 7 - Add an Express API- Lab 8 - Displaying a full game in the routed game-detail component- Lab 9 - Generate a type lib that the API and frontend can share- Lab 10 - Generate Storybook stories for the shared ui component- Lab 11 - E2E test the shared component

In this workshop you'll learn how to develop APIs with Fastify and deploy them to the Platformatic Cloud.

In this workshop you’ll learn how to build a subgraph that indexes NFT blockchain data from the Foundation smart contract. We’ll deploy the API, and learn how to perform queries to retrieve data using various types of data access patterns, implementing filters and sorting.
By the end of the workshop, you should understand how to build and deploy performant APIs to The Graph to index data from any smart contract deployed to Ethereum.
Comments