Re:Relay Modern: Simpler, faster, more extensible
by aj0strow on Thursday April 20, 2017 @04:01PM
(#14160300)
I read architecture.md in the runtime package and it looks perfect for binding websocket updates into components. I was really hoping for the following example:
* create a stand-alone relay store
* query and subscribe to changes, print to console
* imperatively push updated records into store
* see updated data in console
I assume this is possible, but maybe it's not? Or you need a graphql server or container component?
> but there's no mention of subscriptions or client-side state control
The blog post didn't cover all the new features, but both of these use-cases are supported in Relay Modern - https://facebook.github.io/relay/docs/new-in-relay-modern.ht...
GraphQL Subscriptions are supported: applications must inject a network layer that provides support for connecting to the server and receiving subscription updates. Local state is supported via client-only extensions to the schema, combined with an imperative update API. More docs coming soon :-)