Talks
Speakers
Events
Topics
Sign in
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
GraphQL is changing how data is being served in Ruby and Rails products from GitHub to KickStarter. This talk is based on experiences from moving away from Rails REST routing to GraphQL Ruby in production Applications. Lets explore features like Introspection and others in GraphQL Ruby/Rails.
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 Vipul A M's talk 'Beyond REST in Rails' at RubyConf TH 2019, he explores the adoption of GraphQL as an alternative to REST APIs in Ruby on Rails applications. The session starts with an overview of GraphQL, introduced in 2012 and made public in 2015, highlighting challenges faced with traditional REST APIs—especially concerning versioning and over-fetching or under-fetching data due to fixed endpoints. Key points discussed include: - **Introduction to GraphQL:** An alternative to REST that allows clients to request specific data, minimizing issues like N + 1 queries. - **Complexity of REST APIs:** The challenges of maintaining multiple endpoints and ensuring backwards compatibility in large applications are examined as motivation for transitioning to GraphQL. - **Schema Definition:** GraphQL relies on a defined schema where types and relationships are established, enabling precise queries. - **Types and Queries:** Types are created based on ActiveRecord models, and queries are set up to retrieve data efficiently by specifying which fields to return. - **Mutations and Subscriptions:** Mutations are used to change data, while subscriptions facilitate real-time updates. The talk briefly mentions how these work but focuses primarily on queries and types. - **Error Handling and Validation:** GraphQL validates incoming queries against the schema before execution, returning errors for unsupported fields. - **Introspection Feature:** A notable advantage of GraphQL enabling discovery of available queries and fields without needing external documentation, enhancing team collaboration. - **Caching and Performance:** Adjusted caching strategies are necessary for GraphQL since it operates through a single endpoint. Batching is recommended to improve efficiency. - **Versioning and Deprecation:** Developers can deprecate fields and communicate changes, easing the transition between API versions. - **Transition Strategy:** The speaker advises on a gradual adoption of GraphQL within existing applications, suggesting to start by replacing individual REST controllers with GraphQL. The session concludes with a call for questions, emphasizing the potential benefits of using GraphQL in enhancing data access patterns in Rails applications.
Suggest modifications
Cancel