denvned / isomorphic-relay

Adds server side rendering support to React Relay
BSD 2-Clause "Simplified" License
242 stars 53 forks source link

Allow passing of preloaded requests to prepareData (fixes #50) #51

Closed jakepusateri closed 8 years ago

jakepusateri commented 8 years ago

PR for #50

Specifying environment allows injecting data already available locally. Specifying forceFetch allows primeCache to be used instead and a network request to not be needed if all data is present from preloading.

jwb commented 8 years ago

We need this capability.

denvned commented 8 years ago

Thank you @jakepusateri!

denvned commented 8 years ago

Note that I changed preloadedRequests to be a third argument of prepareData.

This is now available in v0.7.3 of isomorphic-relay, and I also added preloadedRequests as a third argument to prepareData of isomorphic-relay-router in v0.8.2.