Hacker News new | ask | show | jobs
by josephsavona 3353 days ago
Thanks for the feedback!

> 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 :-)

3 comments

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?

I'm excited to build an example with Relay Modern and the websocket subscriptions transport, should be really cool!
Awesome!