Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for injection of relayContext in prepareData and shim to RelayEnvironment #28

Closed
aihornmac opened this issue Mar 26, 2016 · 1 comment

Comments

@aihornmac
Copy link

Since I have been following the latest progress of react-relay, knowing that RelayContext is renamed to RelayEnvironment while adding injectNetworkLayer and injectTaskScheduler methods, it would be so nice if prepareData allows a relayContext to be passed down, with which I can put authorization into headers for each request on server-side.

btw, this module is so inspiring, thank you so much for you work!

@denvned
Copy link
Owner

denvned commented Apr 22, 2016

Since v0.6 of isomorphic-relay, you can create a new instance of a Relay network layer (with injected authentication headers/cookies) on each request and pass it as the second argument to IsomorphicRelay.prepareData.

@denvned denvned closed this as completed Apr 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants