The Observer of the Weave
Awaiting and reacting to shifts in the magical fabric.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Observer
ARCANUM SCHOOL: Evocation // Divination
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// CODEX INCANTATION //
type CelestialEvent {
eventName: String!
magnitude: Int!
timestamp: String!
}
type Subscription {
# The Observer pattern natively supported
# Clients subscribe to this field and the Oracle pushes updates
watchCelestialEvents(constellation: String!): CelestialEvent!
}
Subscriptions in GraphQL are the pure embodiment of the Observer pattern. Instead of polling the Oracle continuously (and exhausting one’s mana), a caster establishes a persistent connection, subscribing to specific events. When the fabric of reality shifts, the Oracle automatically pushes the new data to the observing client.
Runic Tags:
#graphql
#behavioral
#observer
#subscriptions
#realtime