0Pricing
GraphQL APIs with Spring Boot · Lesson

Filtering and Scaling Subscriptions

Go beyond basic subscriptions: deliver only the events each client cares about with server-side filtering, and scale subscriptions across multiple Spring Boot instances.

Not Every Client Wants Everything

A naive subscription pushes every event to every subscriber. But a user watching order #42 does not care about order #99.

Filtering ensures each subscriber only receives the events relevant to them.

Subscription Arguments

Subscriptions can take arguments just like queries. A client passes the ID it cares about, and the server uses it to filter the stream.

type Subscription {
  orderUpdated(orderId: ID!): Order
}

All lessons in this course

  1. Understanding GraphQL Subscriptions
  2. Implementing Real-time Updates
  3. Integrating WebSockets with Spring
  4. Filtering and Scaling Subscriptions
← Back to GraphQL APIs with Spring Boot