← Graph

Optimizing performance in Rails apps with GraphQL layer

talk 27 connections

Conference talk at wroclove.rb 2024 by Caio Almeida of Meedan, sharing eight years of lessons building and operating Check's Rails + GraphQL API. Covers the trade-offs of GraphQL vs REST, performance-regression tests via assert_queries, layered monitoring (HTTP request logs + CloudWatch + uptime alerts, Honeycomb/OpenTelemetry at the query-execution level, Apollo GraphQL for per-field metrics), N+1 solutions (graphql-batch, graphql-preload, look_ahead), safeguards (max_depth, query timeout with Sentry notification), field-level caching (graphql-ruby-fragment-cache and an event-based cached-field library built at Meedan using Ruby meta-programming and Rails low-level caching), and concurrency via query batching with Apollo/relay clients and the graphql-ruby multiplex feature. Closes with mutation-side tips (delay to background jobs, bulk DB operations) and a reminder that monitoring is the most important habit. Q&A covers denormalization vs batch/preload, authorization strategies (Pundit at the resource level, graphql-ruby field-level authorization, context object), and why they haven't moved back to REST.

type
talk
talk Optimizing performance in Rails apps with GraphQL layer
about
GraphQL tool
Talk focuses on Rails applications with a GraphQL layer.
talk Optimizing performance in Rails apps with GraphQL layer
about
Uses graphql-ruby features (types, connections, look_ahead, max_depth, multiplex, timeouts, authorization).
talk Optimizing performance in Rails apps with GraphQL layer
about
N+1 Queries concept
N+1 is framed as the classic GraphQL performance problem.
talk Optimizing performance in Rails apps with GraphQL layer
about
Presented as the Shopify-built solution for batching belongs_to loads.
talk Optimizing performance in Rails apps with GraphQL layer
about
Presented as the solution for preloading has_many associations.
talk Optimizing performance in Rails apps with GraphQL layer
about
Explains predictive preloading via look_ahead for complex nested queries.
talk Optimizing performance in Rails apps with GraphQL layer
about
Shown as a simple safeguard against deep nested queries.
talk Optimizing performance in Rails apps with GraphQL layer
about
Shown as a control over whole-query execution time integrated with Sentry.
talk Optimizing performance in Rails apps with GraphQL layer
about
Demonstrated as API-layer fragment caching for expensive fields.
talk Optimizing performance in Rails apps with GraphQL layer
about
Describes Meedan's own event-based cached-field library built on Ruby meta-programming and Rails low-level caching.
talk Optimizing performance in Rails apps with GraphQL layer
about
Covers Apollo/Relay client batching and graphql-ruby's multiplex on the server side.
talk Optimizing performance in Rails apps with GraphQL layer
about
Shown as assert_queries-based Minitest helpers to prevent N+1 regressions.
talk Optimizing performance in Rails apps with GraphQL layer
about
Deep/unpredictable queries are a central problem the talk addresses.
talk Optimizing performance in Rails apps with GraphQL layer
about
Discusses the adage while arguing for anticipatory design where feasible.
talk Optimizing performance in Rails apps with GraphQL layer
about
Honeycomb tool
Used in the monitoring-level examples.
talk Optimizing performance in Rails apps with GraphQL layer
about
Showcased for schema visualization and per-field performance metrics.
talk Optimizing performance in Rails apps with GraphQL layer
about
Underlying tracing standard powering Honeycomb instrumentation.
talk Optimizing performance in Rails apps with GraphQL layer
about
Check project
All concrete examples come from Meedan's Check application.
asked_at
Optimizing performance in Rails apps with GraphQL layer talk
Q&A about alternative optimization approaches.
asked_at
Optimizing performance in Rails apps with GraphQL layer talk
Q&A about authorization for flexible GraphQL queries.
asked_at
Optimizing performance in Rails apps with GraphQL layer talk
Q&A asking if Meedan has considered reverting from GraphQL to REST.
person Caio Almeida
authored
Optimizing performance in Rails apps with GraphQL layer talk
Delivered the talk at wroclove.rb 2024.
from_talk
Optimizing performance in Rails apps with GraphQL layer talk
Speaker's headline takeaway.
from_talk
Optimizing performance in Rails apps with GraphQL layer talk
Closing recommendation on sustained adoption.
from_talk
Optimizing performance in Rails apps with GraphQL layer talk
Repeated caution throughout the talk.
from_talk
Optimizing performance in Rails apps with GraphQL layer talk
Mutation-side recommendation near the end.
talk Optimizing performance in Rails apps with GraphQL layer
presented_at
Talk given at wroclove.rb 2024 (originally scheduled for 2020 before pandemic cancellation).

Provenance

Created
2026-04-17 16:17 seed
Read by
15 extractions