-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Help Wanted :Example with server side Rendering with v 0.8.0 #1058
Comments
Thanks for the question @AhmadEl-Banna. Your best bet is likely going to be to use isomorphic-relay. I see you already commented on the relevant issue there, so I'm going to close this one out. |
@wincent I just want to have another implementation, and also the documentation for the v 0.8.0 is not published yet , so an example will be the only thing we have other than the release Note. |
The latest version of the docs were published to the website when v0.8.0 went out. Note that there are some new APIs that we have intentionally left undocumented, as we are still iterating on them and we want to avoid churn. Other than those things specifically called out in the changelog, is there anything specific you were expecting to be published in the docs with v0.8.0? We want Relay to work in a server-rendered context, but Relay itself is unlikely to provide end-to-end integration or examples for this, at least in the foreseeable (short-term) future. This is something we see largely being implemented in "user space", outside the core framework, which is why we refer people to projects like isomorphic-relay. |
I have created a PR (denvned/isomorphic-relay#33) on the isomorphic-relay repo however I can't get the client fetching working.. I am prompted with |
Great work on that PR. Adding |
Thanks @wincent! Another question: Relay is splitting my query into multiple requests instead of batching them into one when I use arguments on the route. Is this desired behaviour? |
@edvinerikson this is task of And Joseph advised another solution #520 (comment) So I implement it in https://gist.github.com/nodkz/d9a6380d55067192295382e8e490f39f |
Thanks for the info @nodkz, but do you think this still apply when you only have one query? |
Hm. First time see such behaviour. And with your case I think is strange. I understood why relay split queries by router, but here I have no thoughts. |
Yeah same for me, I started seeing this in Relay 0.8 both in the Star wars app and a project I am currently working on. |
Oh, I try update tomorrow on 0.8 and confirm will I have similar query splitting. |
@edvinerikson spent all current day for this writing RelayNetworkLayer with middlewares https://github.com/nodkz/react-relay-network-layer |
@edvinerikson For legacy reasons, Relay splits "plural" root queries into individual queries. In general we want to diff each root value separately, since different fields may be missing for different root values. |
I really need an example with server side Rendering with v 0.8.0.
Thank you
The text was updated successfully, but these errors were encountered: