Podlipodcast player Webplayer

CyberCode Academy

CyberCode Academy

Course 37 - Building Web Apps with Ruby On Rails | Episode 18:Navigating GraphQL and the Graphiti Middle Ground

CyberCode Academy · Jul 1, 2026 · 21:23

0:0021:23

Listen in the Podli app 🎧

Follow your favourite podcasts, listen offline and in the car with CarPlay and Android Auto, and always pick up where you left off. Free to try.

In this lesson, you’ll learn about: REST limitations, GraphQL fundamentals, and the hybrid approach with Graphiti1. The Problem with REST APIsUsing REST:🔹 Key limitations:
👉 Key Insight
REST is simple and scalable—but not always efficient2. Example of Overfetching🔹 Request:GET /users/1 🔹 Response:{ "id": 1, "name": "John", "email": "john@example.com", "address": "...", "preferences": "...", "settings": "..." } 👉 Problem:
👉 Key Insight
REST responses are fixed by the server, not flexible for clients3. Introducing GraphQLUsing GraphQL:🔹 What it solves:
🔹 Example query:{ user(id: 1) { name } } 👉 Response:{ "data": { "user": { "name": "John" } } } 👉 Key Insight
GraphQL eliminates overfetching and underfetching4. GraphQL Schema (Core Concept)🔹 Schema:
🔹 Example:type User { id: ID name: String email: String } 👉 Key Insight
GraphQL is strongly typed, unlike REST5. Queries vs Mutations🔹 Queries (read data):{ users { name } } 🔹 Mutations (write data):mutation { createUser(name: "John") { id } } 👉 Key Insight
GraphQL separates read and write operations clearly6. Testing with GraphiQL🔹 Tool:
🔹 Features:
👉 Key Insight
GraphiQL improves developer experience significantly7. Downsides of GraphQL🔹 Trade-offs:
👉 Key Insight
GraphQL flexibility comes with added complexity8. Introducing Graphiti (Hybrid Approach)Using Graphiti:🔹 Goal:
🔹 Features:
👉 Key Insight
Graphiti gives you flexibility without abandoning REST9. Graphiti Resources🔹 Concept:
🔹 Example:class UserResource < ApplicationResource attribute :name, :string end 👉 Key Insight
Resources act like a structured API layer10. REST vs GraphQL vs Graphiti🔹 REST:
🔹 GraphQL:
🔹 Graphiti:
👉 Key Insight
There is no perfect solution—only trade-offs11. When to Use Each🔹 Use REST:
🔹 Use GraphQL:
🔹 Use Graphiti:
👉 Key Insight
Choose based on project complexity and team needsKey Takeaways


You can listen and download our episodes for free on more than 10 different platforms:
https://linktr.ee/cybercode_academy

Episodes: CyberCode Academy

PodliGet the free Podli app
↓ App