lvarayut / relay-fullstack

:point_up::running: Modern Relay Starter Kit - Integrated with Relay, GraphQL, Express, ES6/ES7, JSX, Webpack, Babel, Material Design Lite, and PostCSS
https://lvarayut.github.io/relay-fullstack/
MIT License
986 stars 126 forks source link

Modern Relay #86

Closed Neitsch closed 7 years ago

Neitsch commented 7 years ago

Using Modern Relay with the drop in replacement. I'll keep this commit open to gradually migrate to Modern Relay. Also

lvarayut commented 7 years ago

Thanks @Neitsch, that's looking good to me.

ncrmro commented 7 years ago

Just saw this, really excited as well. I'm wondering what the routing story is with regards to react-router 4 as well?

Neitsch commented 7 years ago

The issue with react-router-relay is that react-relay is not backward compatible as is. I submitted a PR, but I don't think there will be a quick solution (relay-tools/react-router-relay#235). In the end Modern Relay is supposed to be somewhat different in routing, so we'll see, whether a new solution emerges or the router is maybe not even necessary any more.

Neitsch commented 7 years ago

So, this should be 90% done. Right now we're still in compat mode, since the full switch did not work yet. Nevertheless, it's looking surprisingly good overall. The biggest issue before a full migration is getting the router out of the way. The one thing that is not very elegant is how I am passing Relay around for the mutation. Somehow the prop validation failed at first, so I relaxed the constraints.

Neitsch commented 7 years ago

Anybody who is looking for a reference implementation, look at this https://github.com/relayjs/relay-examples/tree/master/todo-modern