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

TRACKING: feature/redux → feature/apollo #1147

Closed
wants to merge 51 commits into from

Conversation

langpavel
Copy link
Collaborator

@langpavel langpavel commented Feb 24, 2017

  • Apollo client mounted on existing redux store
  • Data are automatically prefetched on server, no imperative code in router
  • Direct server side GraphQL - no additional HTTP request on SSR
  • GraphQL queries are pre-parsed by Webpack loader
  • Demonstrated on Home route/component

@langpavel langpavel changed the title TRACKING: Apollo Client Integration TRACKING: feature/redux → feature/apollo Feb 24, 2017
@langpavel langpavel self-assigned this Mar 13, 2017
@stubailo
Copy link

Just looked over everything, this looks awesome - is there anything in particular you would want more feedback on?

@langpavel
Copy link
Collaborator Author

@stubailo Feedback is welcomed, but this is feature branch.
It should be for reference. When I came to RSK I feel it should cover more advanced topics. It still appears around. I'm happy with this but I feel more people wants more.. On other side, I want people knowing why this..

@stubailo
Copy link

Ah, OK - so the idea is to keep it open as an example for how to do a certain thing, but not merge it?

I'd be happy to help provide some content about what this is doing, or help add some more advanced features.

@langpavel
Copy link
Collaborator Author

langpavel commented Mar 21, 2017

I'm using this in production on two small sites, I'm back-pushing features there.. I love learning and feedback
but RSK is not my property, so I have clean deal with @koistya, this will be "feature". I will be happy with redux to be merged in, but this is still too much for starter. Koistya have it's own PR as simplest advice to opt in redux. I can fork RSK and maintain fork myself, but it will not be so beneficial because there are too much work done..

About Apollo, this is so opinionated, I'm almost sure this will never lands, but I will keep it up to date I promise

So enjoy my work, if you want my response, just mention me @stubailo :-)

@tim-soft
Copy link

tim-soft commented May 5, 2017

First of all, this is an awesome boilerplate

Poking around in the code has brought up a few questions

  1. Why go with graphql/express-graphql over apollographql/graphql-server, which seems to pair really nicely with the Apollo Client?

Which brings up my next question

  1. Apollo client supports subscriptions, shouldn't the apollo client feature branch be exemplary of this feature? (I may be mistaken, but I do not believe it is in here)

Thank you for your hard work @langpavel!

@tim-soft
Copy link

@leviwheatcroft Where things get a little more complex/opinionated with subscriptions is a pub/sub system. Something like Redis is a very big dependency and the Websocket server should be it's own app imo

@piglovesyou
Copy link
Collaborator

piglovesyou commented Jul 5, 2018

@langpavel This is the best combination of the web frontend of the time I feel, I was inspired from this branch a lot. Thanks.

Thing is, Apollo Client does not have to depend on Redux since it has its own caching mechanism. The official docs points to this blog post.

So what do you think when I say feature/apollo can only based on master, instead of feature/redux? That will push efficiency and simplicity of the boilerplate forward, I believe.

But yeah feature/react-intl is a dependant of feature/apollo and things are a little complicated. Then I think I also can push a new feature/apollo-pure or something.

@tim-soft
Copy link

tim-soft commented Jul 5, 2018

@piglovesyou I'm not sure what you mean... Apollo client isn't relying on Redux at all.
a65988a

@piglovesyou
Copy link
Collaborator

piglovesyou commented Jul 5, 2018

@tim-soft Yeah I know Apollo Client doesn't. Then how about having "Redux-free Apollo branch" in RSK?

AS IS: feature/apollo based on feature/redux
My proposal: feature/apollo based on master

@jatinnn
Copy link

jatinnn commented Jul 12, 2018

Would have been nice if feature/apollo was based on master rather then feature/redux.

@langpavel
Copy link
Collaborator Author

@piglovesyou feature/apollo-pure sounds great. But I'm sorry, I have no time to do this in near future

@piglovesyou
Copy link
Collaborator

@langpavel Good to hear that.

I'm really interested in doing it using apollo-link-state and apollo-server, but I cannot promise starting it soon(´-`;)

@piglovesyou
Copy link
Collaborator

#1664

I created a PR of a pure Apollo branch called feature/apollo-pure. Basically I just introduced

  • apollo-link-state
    • with initial state sharing between server and client
    • with networkState example
  • apollo-server

without

  • redux
  • Fetch function in a context, since apollo-client will take care of it

upon the master branch, by picking some codebase from feature/apollo. I really appreciate a quick review from the Apollo-interested engineers around.

@langpavel
Copy link
Collaborator Author

@piglovesyou, nice nickname 🤣
Great work! Thank you! Let's discuss more in #1664

@montoya332
Copy link

should these be closed since they are outdated

@koistya koistya closed this Sep 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.