AMA Session with Lee Byron

Rate this content
Bookmark

AMA Session with Lee Byron

This talk has been presented at GraphQL Galaxy 2022, check out the latest edition of this Tech Conference.

FAQ

GraphQL was developed at Facebook in response to the need for a more efficient and structured way to fetch data for their new native mobile applications. Traditional APIs were found lacking, prompting the development of a new system that better suited Facebook's product architecture and mobile requirements.

The initial development of GraphQL was a collaborative effort by Nick Schrock, Dan Schafer, and Lee Byron. Their combined efforts over a focused period resulted in the creation of the prototype that included many features of today's GraphQL.

After its initial creation for Facebook's mobile apps, GraphQL's infrastructure evolved significantly over the years. It became integral to the way data is served to Facebook's apps, maintaining its core principles while expanding in complexity and capability.

GraphQL allows for precise data fetching with a strong type system, reducing over-fetching and under-fetching problems. It provides a more efficient, powerful, and flexible alternative to traditional REST APIs, particularly useful in complex systems and various client requirements.

After being open-sourced, GraphQL gained rapid adoption across various industries due to its efficient data handling capabilities. It has enabled countless companies to optimize their APIs and improve client-server interactions, fostering a large community of contributors and users globally.

The GraphQL Foundation is an organization dedicated to maintaining and advancing GraphQL. It offers a platform for both individuals and companies to contribute to the project, influence its direction, and ensure its ongoing success and health through collaborative development.

Current developments in GraphQL include features like 'defer' and 'stream' which enhance real-time data capabilities, moving GraphQL beyond traditional transactional uses. These features allow for continuous data delivery, aligning with modern development practices in reactive programming and UI rendering.

Lee Byron
Lee Byron
19 min
08 Dec, 2022

Comments

Sign in or register to post your comment.

Video Summary and Transcription

GraphQL at Facebook started as a solution for the migration to structured product infrastructure and the move to mobile. The birth of FQL highlighted the need for a better tool than SQL. The impact of GraphQL has been impressive, with unexpected growth and usage in various domains. Exciting developments include new features like defer and stream, making GraphQL a live, continuous data delivery and UI rendering tool. Personal experiences with GraphQL involve using it to move data between backend and frontend, with challenges in integrating it into IDE environments.

1. The Origin of GraphQL at Facebook

Short description:

Thanks, Lee, for joining. How did GraphQL start? The original story of this? How did we all end up here in this weird conference? Two things were happening at Facebook. The migration from PHP code base to structured product infrastructure. The move to mobile. Mobile development at Facebook was web only. Performance issues led to a project for native development in 2012. The team realized the need for a product API.

So, yeah, so, thanks, Lee, for joining. I'm really excited for AMA. And let me start with maybe the first question, which probably you're one of the best, if not the best, person to answer this. How did GraphQL start? What's the original story of this? And how did we all end up here in this weird conference? Yeah. This is a throwback, because this was, at this point, over 10 years ago, which is kind of crazy.

To kind of set the stage, two things were happening at Facebook at this moment. One was our monolith code base that served Facebook.com was doing a migration from early phase PHP code base to more structured with great product infrastructure. We have this sort of ORM-esque kind of layer that ends and we're starting to introduce type systems into the code base and that was creating this sort of very amazing abstraction away from underlying systems and data storage, and you could just sort of interact with these high-level objects to get the data that you needed to put together any particular web-based product that you were doing. This was great.

Another thing that was happening was the move to mobile. So, Facebook, of course, started as a desktop web only platform way back in 2003-2004, and from there slowly made its way into mobile. The first kind of cracks at mobile were, if you remember, WAP, the like HTML variant that was all black and white and had no images. Like that for flip phones, like I think that was the very first version of Facebook for mobile. And then that sort of evolved as devices evolved and sort of followed the inertia of that, and that meant that all mobile development at Facebook for many years was really web only. There was an iOS app, but it was super limited. It only basically did you could look at your newsfeed and that was kind of it. And eventually even that got replaced with the full web app. There was sort of a wrap around it. And it sucked. It was really, it wasn't great, like the performance was bad. We tried to do really cool, like, animations in the, you know, the internalized browser, and it would just consume all the RAM on your device, and that would crash. So it was slow, it was buggy, it crashed a lot, and basically, the web technology, at least in that moment, was not growing and scaling, developing it at the pace we needed it to. So we had created a project to go back to native development. And this was in 2012, which was still relatively early for native mobile engineering, but sort of clean slate, new project in Xcode style, started creating a new iOS app. A little skunk works team of three or four people, iOS developers building this thing. And they realized that they just couldn't get the right data that they needed, because all of Facebook's development to that point was basically just stuff happens behind the scenes in PHP, and then HTML comes out the other side to serve a webpage. And not a ton of thought had been put into an API, not as sort of a partnerships thing. We had developer partners on Facebook that used a developer API. But we hadn't thought about a product API. Like, what would it look like to build a true Facebook product on top of an API? So, I happen to be supporting this team at the time.

2. The Birth of FQL and the Need for a Better Tool

Short description:

We started looking at various APIs we'd built before, and they were all kind of underwhelming. And there's this new one that we had built called FQL, which was sort of a variant on SQL, but was layered on top of this new ORM system we had built, these ENTs. It was really exciting, but if you've ever had to write a join between six tables, it's just like brain starts melting. I was like, this is nuts. I don't think SQL is the right tool for this. There's gotta be a better way.

They were engineers that were working on my team. And they bounced into this problem, and were like, all right, well, let's go dig around and see what we can find. And we started looking at various APIs we'd built before, and they were all kind of underwhelming. And there's this new one that we had built called FQL, which was sort of a variant on SQL, but was layered on top of this new ORM system we had built, these ENTs. It was really exciting, but if you've ever had to write a join between six tables, it's just like brain starts melting. And basically, we'd write these FQL queries that only maybe two people at the whole company could interpret. And they were like hundreds of lines of SQL to write these join queries. I was like, this is nuts. I don't think SQL is the right tool for this. There's gotta be a better way.

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

From GraphQL Zero to GraphQL Hero with RedwoodJS
GraphQL Galaxy 2021GraphQL Galaxy 2021
32 min
From GraphQL Zero to GraphQL Hero with RedwoodJS
Top Content
Tom Pressenwurter introduces Redwood.js, a full stack app framework for building GraphQL APIs easily and maintainably. He demonstrates a Redwood.js application with a React-based front end and a Node.js API. Redwood.js offers a simplified folder structure and schema for organizing the application. It provides easy data manipulation and CRUD operations through GraphQL functions. Redwood.js allows for easy implementation of new queries and directives, including authentication and limiting access to data. It is a stable and production-ready framework that integrates well with other front-end technologies.
Local State and Server Cache: Finding a Balance
Vue.js London Live 2021Vue.js London Live 2021
24 min
Local State and Server Cache: Finding a Balance
Top Content
This Talk discusses handling local state in software development, particularly when dealing with asynchronous behavior and API requests. It explores the challenges of managing global state and the need for actions when handling server data. The Talk also highlights the issue of fetching data not in Vuex and the challenges of keeping data up-to-date in Vuex. It mentions alternative tools like Apollo Client and React Query for handling local state. The Talk concludes with a discussion on GitLab going public and the celebration that followed.
Batteries Included Reimagined - The Revival of GraphQL Yoga
GraphQL Galaxy 2021GraphQL Galaxy 2021
33 min
Batteries Included Reimagined - The Revival of GraphQL Yoga
Envelope is a powerful GraphQL plugin system that simplifies server development and allows for powerful plugin integration. It provides conformity for large corporations with multiple GraphQL servers and can be used with various frameworks. Envelope acts as the Babel of GraphQL, allowing the use of non-spec features. The Guild offers GraphQL Hive, a service similar to Apollo Studio, and encourages collaboration with other frameworks and languages.
Rock Solid React and GraphQL Apps for People in a Hurry
GraphQL Galaxy 2022GraphQL Galaxy 2022
29 min
Rock Solid React and GraphQL Apps for People in a Hurry
The Talk discusses the challenges and advancements in using GraphQL and React together. It introduces RedwoodJS, a framework that simplifies frontend-backend integration and provides features like code generation, scaffolding, and authentication. The Talk demonstrates how to set up a Redwood project, generate layouts and models, and perform CRUD operations. Redwood automates many GraphQL parts and provides an easy way for developers to get started with GraphQL. It also highlights the benefits of Redwood and suggests checking out RedwoodJS.com for more information.
Adopting GraphQL in an Enterprise
GraphQL Galaxy 2021GraphQL Galaxy 2021
32 min
Adopting GraphQL in an Enterprise
Today's Talk is about adopting GraphQL in an enterprise. It discusses the challenges of using REST APIs and the benefits of GraphQL. The Talk explores different approaches to adopting GraphQL, including coexistence with REST APIs. It emphasizes the power of GraphQL and provides tips for successful adoption. Overall, the Talk highlights the advantages of GraphQL in terms of efficiency, collaboration, and control over APIs.
Step aside resolvers: a new approach to GraphQL execution
GraphQL Galaxy 2022GraphQL Galaxy 2022
16 min
Step aside resolvers: a new approach to GraphQL execution
GraphQL has made a huge impact in the way we build client applications, websites, and mobile apps. Despite the dominance of resolvers, the GraphQL specification does not mandate their use. Introducing Graphast, a new project that compiles GraphQL operations into execution and output plans, providing advanced optimizations. In GraphFast, instead of resolvers, we have plan resolvers that deal with future data. Graphfast plan resolvers are short and efficient, supporting all features of modern GraphQL.

Workshops on related topic

Build with SvelteKit and GraphQL
GraphQL Galaxy 2021GraphQL Galaxy 2021
140 min
Build with SvelteKit and GraphQL
Top Content
Featured WorkshopFree
Scott Spence
Scott Spence
Have you ever thought about building something that doesn't require a lot of boilerplate with a tiny bundle size? In this workshop, Scott Spence will go from hello world to covering routing and using endpoints in SvelteKit. You'll set up a backend GraphQL API then use GraphQL queries with SvelteKit to display the GraphQL API data. You'll build a fast secure project that uses SvelteKit's features, then deploy it as a fully static site. This course is for the Svelte curious who haven't had extensive experience with SvelteKit and want a deeper understanding of how to use it in practical applications.

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
Build Modern Applications Using GraphQL and Javascript
Node Congress 2024Node Congress 2024
152 min
Build Modern Applications Using GraphQL and Javascript
Featured Workshop
Emanuel Scirlet
Miguel Henriques
2 authors
Come and learn how you can supercharge your modern and secure applications using GraphQL and Javascript. In this workshop we will build a GraphQL API and we will demonstrate the benefits of the query language for APIs and what use cases that are fit for it. Basic Javascript knowledge required.
End-To-End Type Safety with React, GraphQL & Prisma
React Advanced Conference 2022React Advanced Conference 2022
95 min
End-To-End Type Safety with React, GraphQL & Prisma
Featured WorkshopFree
Sabin Adams
Sabin Adams
In this workshop, you will get a first-hand look at what end-to-end type safety is and why it is important. To accomplish this, you’ll be building a GraphQL API using modern, relevant tools which will be consumed by a React client.
Prerequisites: - Node.js installed on your machine (12.2.X / 14.X)- It is recommended (but not required) to use VS Code for the practical tasks- An IDE installed (VSCode recommended)- (Good to have)*A basic understanding of Node.js, React, and TypeScript
GraphQL for React Developers
GraphQL Galaxy 2022GraphQL Galaxy 2022
112 min
GraphQL for React Developers
Featured Workshop
Roy Derks
Roy Derks
There are many advantages to using GraphQL as a datasource for frontend development, compared to REST APIs. We developers in example need to write a lot of imperative code to retrieve data to display in our applications and handle state. With GraphQL you cannot only decrease the amount of code needed around data fetching and state-management you'll also get increased flexibility, better performance and most of all an improved developer experience. In this workshop you'll learn how GraphQL can improve your work as a frontend developer and how to handle GraphQL in your frontend React application.
Build a Headless WordPress App with Next.js and WPGraphQL
React Summit 2022React Summit 2022
173 min
Build a Headless WordPress App with Next.js and WPGraphQL
Top Content
WorkshopFree
Kellen Mace
Kellen Mace
In this workshop, you’ll learn how to build a Next.js app that uses Apollo Client to fetch data from a headless WordPress backend and use it to render the pages of your app. You’ll learn when you should consider a headless WordPress architecture, how to turn a WordPress backend into a GraphQL server, how to compose queries using the GraphiQL IDE, how to colocate GraphQL fragments with your components, and more.
Relational Database Modeling for GraphQL
GraphQL Galaxy 2020GraphQL Galaxy 2020
106 min
Relational Database Modeling for GraphQL
Top Content
WorkshopFree
Adron Hall
Adron Hall
In this workshop we'll dig deeper into data modeling. We'll start with a discussion about various database types and how they map to GraphQL. Once that groundwork is laid out, the focus will shift to specific types of databases and how to build data models that work best for GraphQL within various scenarios.
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