Talks
Speakers
Events
Topics
Sign in
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
Are you considering building a GraphQL API for your Rails project or already have one? Do you know GraphQL can be leveraged beyond HTTP APIs? We will explore how GraphQL does not depend on HTTP and can be used as a secure and structured data layer for Rails projects. You will learn to deliver real-time GGraphQL through Websockets, Webhooks containing all the data you need, provide data for WebAssembly code and parallelize queries exporting large amounts of data. Every Rails project needs consistent access to data and GraphQL brings solutions beyond the typical HTTP API.
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
In the presentation titled "GraphQL and Rails beyond HTTP APIs," Gui Vieira, a software developer at Shopify, explores the versatile applications of GraphQL, extending well beyond traditional HTTP APIs. The session, held at RailsConf 2022, delves into how GraphQL can serve as a secure and structured data layer in Rails projects, discussing several innovative use cases and implementation strategies. Key Points Discussed: - **Introduction to GraphQL**: Vieira begins by addressing the common question of how GraphQL compares to REST. He notes that while it's often seen as a replacement, GraphQL offers much more functionality that transcends the limitations of HTTP APIs. - **Case Study - Space Trips API**: Using a fictional API for space tourism, Vieira demonstrates various queries to book flights and manage passengers, emphasizing how GraphQL queries return predictable structures that enhance developer confidence. - **Execution Contexts**: He explains that GraphQL is agnostic to HTTP, allowing it to be executed in diverse environments like background jobs or even from database-stored queries, enabling a wide range of use cases. - **Webhooks**: The presentation discusses how organizations can improve event-driven workflows using GraphQL webhooks. For example, an organization called "Orbital" automates passenger tagging processes post-flight, showcasing how GraphQL allows clients to specify the exact data they need in webhook responses, ultimately simplifying operations. - **WebAssembly Integration**: Vieira introduces WebAssembly to replace the need for maintaining server endpoints for webhooks, facilitating function execution in a secure environment without excessive networking overhead. - **Bulk Operations for Data Export**: The topic extends to handling large-scale data exports through GraphQL's bulk operations feature. This allows requests to be processed as background jobs, significantly reducing the strain on both the client and server. - **Comparison of GraphQL and REST**: The conclusion emphasizes that GraphQL is not just an HTTP API alternative; it presents a wealth of capabilities, making it vital to explore its full potential. Conclusions and Takeaways: - GraphQL provides a flexible framework for various data handling needs in Rails applications. - Beyond HTTP, GraphQL supports real-time data communication, minimizes unnecessary API calls, and allows for effective data query customization. - Developers are encouraged to dive deeper into GraphQL to discover its extensive functionalities and adapt them to their project requirements.
Suggest modifications
Cancel