Skip to content

Optimize GraphQL subscription payloads for fractional market feeds #414

Description

@Fatimasanusi

Description

Broadcasting full vault objects over GraphQL subscriptions clogs bandwidth and causes rendering lag on mobile clients.

Architecture & Context

As detailed in GRAPHQL_SUBSCRIPTION_OPTIMIZATION.md, subscriptions must strictly utilize delta-payloads. Instead of sending the entire fractional order book, the backend should only publish the specific price diffs and share volume changes.

Technical Requirements

  • Refactor subscription resolvers to emit isolated state changes.
  • Implement a diffing algorithm between the previous and current block state.
  • Ensure payload sizes do not exceed 2KB per tick.

Acceptance Criteria

  • Network inspector confirms only delta data is transmitted over WSS.
  • GraphQL payload size is reduced by at least 80%.
  • Clients successfully reconstruct the full state using the deltas.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions