-
Notifications
You must be signed in to change notification settings - Fork 53
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
Document injected data format. #30
Comments
@bigblind if you're going to be rendering this client-side only, you should be able to use the regular |
@bigblind naturally, it will become your responsibility as a developer to provide all the correct data that Relay would request if it was rendered on the server, and update the data whenever you update the components, etc. Should not be too hard, just something to keep in mind when you're making changes. I am not sure if I am reading the change logs correctly, but it seems like with 0.8 this is possible just with react-relay as @hellatan suggested? |
@thelordoftheboards What API method on relay would I call then to inject the data? I asked about this in the Relay issue tracker, and they directed me here, and it seems pretty clear that I need the |
@bigblind ok, i think i see what you mean based on your comment in your relay comment. As you mentioned, i would imagine you would use the You'd obviously need to mimic the data structure that that method requires, which looks something like this: [ { query:
{ calls: [],
children: [Object],
directives: [],
fieldName: 'viewer',
isDeferred: false,
kind: 'Query',
metadata: [Object],
name: 'CollectionsLandingQueryRoute',
type: 'Viewer' },
result: { viewer: [Object] } } ] Hypothetically it sounds like it could work, but I'm pretty new to isomorphic react (as in started using it the past couple days) so I'm not 100% sure what the inner workings of The reason why there's |
The data is an array of The shape of |
Hi,
I'd like to use just the client-side part of this. My app is built using Django, and I'd prefer not to add anything that requires javascript evaluation on the server. I can probably generate the json in Python. But in order to do that I'd like to know how the data is structured.
The text was updated successfully, but these errors were encountered: