Skip to content

Kévin Dunglas

Founder of Les-Tilleuls.coop (worker-owned cooperative). Creator of API Platform, FrankenPHP, Mercure.rocks, Vulcain.rocks and of some Symfony components.

Menu
  • Talks
  • Resume
  • Sponsor me
  • Contact
Menu

REST vs GraphQL: illustrated examples with the API Platform framework (PHPTour/SymfonyLive)

Posted on March 30, 2018September 26, 2021 by Kévin Dunglas

GraphQL is an increasingly popular alternative to REST architectures for building web APIs.

The query language promoted by Facebook has undeniable advantages: retrieve exactly what the client need, limitation of the number of queries, strong typing, powerful and extremely well thought out syntax…

However, it also suffers from often underestimated problems including HTTP cache, logs, security or authentication, features that are the basis of the today’s web stack. GraphQL is also a non-standard format that requires a specific parser.

In addition, modern REST-based hypermedia formats such as JSON-LD or JSON API have features very similar to those of GraphQL (and more advanced ones) while remaining compatible with the fundamentals of the web.

The API Platform framework, based on Symfony, makes it easy to create REST APIs (JSON-LD, JSON API, HAL …) just like GraphQL.

After listing the advantages and disadvantages of different formats, we will study through different cases of frequent use when it is better to use GraphQL, REST or both in addition.

Related posts:

  1. API Platform and Symfony: a Framework for API-driven Projects (SymfonyCon)
  2. Creating hypermedia APIs in a few minutes using the API Platform framework (APIDays)
  3. API Platform 2.2: GraphQL, JSON API, React admin and PWA, Kubernetes instant deployment and many more new features
  4. API Platform: A Framework for API-driven Projects (DevTalks Bucharest)

1 thought on “REST vs GraphQL: illustrated examples with the API Platform framework (PHPTour/SymfonyLive)”

  1. Przemysław Lib says:
    April 16, 2018 at 9:39 am

    Will there be publicly available video from this talk?

    Reply

Leave a ReplyCancel reply

Social

  • Bluesky
  • GitHub
  • LinkedIn
  • Mastodon
  • X
  • YouTube

Links

  • API Platform
  • FrankenPHP
  • Les-Tilleuls.coop
  • Mercure.rocks
  • Vulcain.rocks

Subscribe to this blog

Top Posts & Pages

  • FrankenPHP: The Modern Php App Server, written in Go
  • Develop Faster With FrankenPHP
  • FrankenPHP 1.3: Massive Performance Improvements, Watcher Mode, Dedicated Prometheus Metrics, and More
  • JSON Columns and Doctrine DBAL 3 Upgrade
  • FrankenPHP Is Now Officially Supported by The PHP Foundation
  • Securely Access Private Git Repositories and Composer Packages in Docker Builds
  • Symfony's New Native Docker Support (Symfony World)
  • How to debug Xdebug... or any other weird bug in PHP
  • Preventing CORS Preflight Requests Using Content Negotiation
  • Running Laravel Apps With FrankenPHP (Laracon EU)

Tags

Apache API API Platform Buzz Caddy Docker Doctrine FrankenPHP Go Google GraphQL HTTP/2 Hydra hypermedia Hébergement Javascript JSON-LD Kubernetes La Coopérative des Tilleuls Les-Tilleuls.coop Lille Linux Mac Mercure Messagerie Instantanée MySQL performance PHP Punk Rock Python React REST Rock'n'Roll Schema.org Security SEO SEO Symfony Symfony Live Sécurité Ubuntu Web 2.0 webperf XHTML XML

Archives

Categories

  • DevOps (85)
    • Ubuntu (68)
  • Go (18)
  • JavaScript (46)
  • Mercure (7)
  • Opinions (91)
  • PHP (171)
    • API Platform (77)
    • FrankenPHP (10)
    • Laravel (1)
    • Symfony (97)
    • Wordpress (6)
  • Python (14)
  • Security (15)
  • SEO (25)
  • Talks (46)
© 2025 Kévin Dunglas | Powered by Minimalist Blog WordPress Theme