Navigation Menu

Skip to content

mattkrick/relay-linear-publish-queue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

relay-linear-publish-queue

Publish changes in the order they're received

Installation

yarn add relay-linear-publish-queue

Why

High level architecture

  • Updates (local, optimistic, or server) get put into a queue
  • Updates get processed in that order
  • When a server update returns, it's provided the same state as it's optimistic counterpart. This is standard for distributed systems. Otherwise, state is a function of latency, which causes divergence.

Usage

import defaultGetDataID from 'relay-runtime/lib/defaultGetDataID'
import LinearPublishQueue from 'relay-linear-publish-queue'
const publishQueue = new LinearPublishQueue(store, handlerProvider, defaultGetDataID)
new Environment({store, handlerProvider, network, publishQueue})

Also requires installing my fork. See package.json for the hash

License

MIT

About

Publish changes in the order they're received.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published