πŸ•ΈοΈ API Patterns and Practices: GraphQL
Chapters Examples Bibliography GitHub β†—
Home / Real-time & Client Integration
Part 10 2 chapters

Real-time & Client Integration

Push live tracking updates with subscriptions and consume the graph from typed clients.

Chapter 21

Real-time: subscriptions vs SSE vs WebSockets

Pushing handling events to a client three ways on both stacks: Subscription.cargoHandled over graphql-transport-ws, GraphQL over SSE, and a plain SSE feed that resumes from Last-Event-ID. The event path from store to frame, what each event costs, how subscribers are cleaned up, and where a raw WebSocket protocol fits.

17 min readRead β†’
Chapter 22

Client integration

What a GraphQL client adds over curl: a normalized cache that answers a second query with no request and takes a mutation payload into the cached object, types generated from the canonical SDL that stop a build on a stale document, gql with local schema validation, the SmallRye typesafe and dynamic clients, partial results as data a client keeps, and a header that names the client.

17 min readRead β†’
← Previous part Observability & the Gateway Next part β†’ Testing & Debugging

API Patterns and Practices: GraphQL

Designing GraphQL APIs well, with runnable examples in Quarkus SmallRye GraphQL and Python Strawberry against one canonical SDL contract.

Site

  • Outline
  • Bibliography

Reference

  • GraphQL β†—
  • GraphQL specification β†—
  • SmallRye GraphQL β†—
  • Strawberry β†—
  • View on GitHub β†—
  • Issues β†—
Open source Β· MIT Last built 2026-10-17