Talks
Speakers
Events
Topics
Sign in
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
Optimizing for API Consumers with GraphQL by Brooks Swinnerton GraphQL is an exciting new query language that's transforming the way we think about APIs. Used in production by Facebook, GitHub, and Shopify, it challenges RESTful API design by empowering consumers to query for exactly the information they need. In this talk, I will give an introduction to the query language, how GitHub uses it internally with Ruby and Rails, and the lessons they learned launching their GraphQL API externally.
Date
Summarized using AI?
If this talk's summary was generated by AI, please check this box. A "Summarized using AI" badge will be displayed in the summary tab to indicate that the summary was generated using AI.
Show "Summarized using AI" badge on summary page
Summary
Markdown supported
The video titled "Optimizing for API Consumers with GraphQL" features Brooks Swinnerton, a platform engineer at GitHub, who presents at the GoRuCo 2017 conference. The talk centers around the advantages of using GraphQL as a query language for APIs, particularly in improving the developer experience for API consumers, compared to traditional REST APIs. **Key Points Discussed:** - **Introduction to APIs and REST:** Swinnerton begins by reviewing REST APIs, discussing their structure and components such as HTTP verbs, endpoints, and JSON responses that represent resources. He highlights the challenge REST APIs pose for clients, especially in mobile environments where multiple requests are often needed to gather required data. - **Client-Centric Design:** He questions the REST model's server optimizations and calls for a shift towards a client-centric perspective. One method mentioned is the backends-for-frontends approach, which assigns separate endpoints for different devices but acknowledges its limitations, particularly for public APIs. - **Introduction to GraphQL:** GraphQL is introduced as a solution, functioning similarly to SQL but for APIs. This structured query language allows clients to specify exactly what data is needed, thus reducing the number of requests and improving efficiency. - **Key Features of GraphQL:** Swinnerton discusses several GraphQL features: - **Typed System** - Allows for validation of queries, ensuring proper data types are returned. - **Introspection** - Enables automatic documentation and understanding of available queries. - **Alias and Fragments** - Facilitates reuse and prevents name conflicts within queries. - **Live Demonstration:** A live demo showcased how to use GraphiQL, a tool for building queries. It illustrated how users can fetch specific restaurant data efficiently, leveraging the introspective nature of GraphQL to construct queries without needing exhaustive prior knowledge of the API. - **Implementation of GraphQL at GitHub:** Swinnerton shares GitHub's journey in adopting GraphQL, beginning with a proof-of-concept in March 2016 and culminating in its public release at GitHub Universe. He reveals that GitHub processes millions of GraphQL queries daily and discusses the organizational shift towards schema-driven development. **Conclusions and Takeaways:** - Swinnerton emphasizes that GraphQL allows for better optimization for API consumers through a single endpoint which reduces the number of network requests and improves the client experience. - Through the use of GraphQL, GitHub has seen substantial growth in efficiency and satisfaction for their API consumers, reinforcing the idea that prioritizing client needs leads to better API designs. For those interested, more information on GraphQL can be found at NYCrestaurantgrades.com and GraphQL.org.
Suggest modifications
Cancel