-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
How about using Relay together GraphQL? #1062
Comments
PR? Yes please :-) |
Keep in mind there is also #1057 which removes backend completely.. |
Yeah, I'll take a look on this, it's good idea to separate API & Frontend |
@hienhuynhtm I just added Relay integration in Node.js API Starter Kit which is deployed at reactstarter.com/graphql. If you like, you can help me integrate Relay on the |
Yeah, I'll take a look on this branch, you very active koistya (y) |
I think Apollo Client could be a better choice because it is easier to integrate with the technologies already used in this starter kit. (Disclaimer: I work on Apollo) |
@stubailo Can be Apollo Client used on server side too for SSR? I have cookie based authentication and server side implementation for fetch wit credentials, can I use my own |
I'm really interested in a feature/relay branch too which is showing the basic implementation of relay with RSK. I've tried it on my own, but couldn't make it work. Problems that I'm facing with integrating Relay: With the current implementation, this seems to be impossible, because there is no abstract App component, but an App component which needs a context and a child component tree returned from the If anyone has already a working implementation of |
@stay2be you can return from routes any information to work with after const route = {
path: '/posts/:id',
action() {
return {
title: 'Posts',
queries: {
viewer: Relay.QL`{ viewer }`,
product: Relay.QL`{ posts(id: $id) }`
},
component: RelayContainerComponentName,
// ...
};
}
};
// ...
const route = await UniversalRouter.resolve(route, '/posts/1');
ReactDOM.render(<route.component queries={route.queries} />, document.body); |
@langpavel yes you can pass any options that you want to |
Looks like I should try it 😄 But I don't promise feature branch yet.. |
@stay2be I started building a blog with this RSK, and failed to integrate relay. and i tried the IsomorphciRelay you've implied and now stopped in the mid - for the lack of a WYGIWYS online editor, and now I'm trying to build a simple editor in spare time. |
@jonirrings by the way, Apollo has subscriptions and batching today, might be worth a shot! |
@stubailo yes, I've read your article and followed Apollo GraphQL on medium, and Apollo is a very competitive GraphQL solution. |
@frenzzy @jonirrings Thanks for helping me out. Apollo Client might be worth a shot. But for this specific project I need to integrate Relay. In order to get this work I've dropped Universal Router (nice work by the way!) and integrated React Router (+ Isomorphic Relay + Isomorphic Relay Router). For now, this stack works like a charm. |
I just created Apollo integration feature branch! Check tracking PR #1147, it's awesome! cc @koistya @frenzzy @hienhuynhtm @stubailo @jonirrings @stay2be @slackday |
Really excited to see this happen! |
Hey everyone there, when Relay 2.0 will be there, I expect that someone will kick this again! I love Apollo for things just happens, Relay can be awesome too but.. there are just talks about.. and using 1.x was not piece of cake as it looks. But yes, we are watching! :-) |
@hienhuynhtm thank you very much for crating this issue! Unfortunately, we have close it due to inactivity. Feel free to re-open it or join our Discord channel for discussion. NOTE: The |
Hi guys,
I saw that Relay works very well with GraphQL, why don't we use Relay? Should I make a PR to integrate Relay to our app?
The text was updated successfully, but these errors were encountered: