Apollo - React - Todo

Hey there,

So I built a large meteor-angular project before 1.3 that was pretty awesome, it was almost ready for “production” but got put on hold for various reasons.

My biggest issues at the time was the angular reactivity side of things… just felt clunky. Now I want to redo the project and I figure why not use react and apollo!

I’ve looked at the meteor react todo github repo (and tutorial) and it looks pretty awesome. I like the structure of the code, the smooth transitions between views etc etc. So my plan of action is:

  • Build a meteor project that is structured the same as the todo react repo.
  • Add in the necessary packages for apollo
  • Start migrating code across from my previous meteor project into react/apollo structure

My main reasons for wanting to use Apollo is graphql, performance, structuring my queries/joins in a nicer manner etc.

My questions are:

  1. Should I be jumping into Apollo so soon or stick to pub/sub and wait?
  2. Will grounddb - offline support still work?
  3. Any mobile issues I need to consider?
  4. Structuring data - any changes I should consider?

My biggest challenge earlier was point 4. I ended up having duplicate data all over the place and then I had to write complex update queries that would update various collections when an update was made on one item. E.g. a user can have many issues. Each issue has the user_id and the users name as I list this out and this can be filtered on. If the user changes there name I have to update the user collection and all issues who have this is.

Summary of project:

Authentication
Many-to-many relationship collections (projects -> users, projects -> issues, issues -> users, issues -> images, notifications -> users etc)
Roles and permissions
Push notifications
Mobile app with offline support (crucial)
Reports (tables to pdfs / excel)
QR code integration

Anyway thoughts and opinions are always welcome.

Love meteor, love angular, fingers crossed for react.

(also I’ve looked at tonnes of other solutions e.g. horizon, featherjs etc etc but Meteor keeps dragging me back in :slight_smile: )

Well you can try Apollo now but for production use i would suggest to wait for Meteor 1.5 because it’s focus is Apollo integration. By the way learning Apollo by imitating todo app is a good idea.

That’s interesting. I’m at a similar point with Meteor. Did a project with 1.3, MongoDB and REST api with the Http package with success. Now I’m facing the same dilemma, I experimented with Apollo-GraphQL both with Meteor and with Relay. Took a while to work out the endless dependency hell on a daily basis. Conclusion: sounds awesome but way to unstable to be worth investing significant amount of time at this point.

Relay-GraphQL is awesome for the reactivity side but the demos doesn’t cover issues like local caching and definitely not offline use. That leaves us with Meteor still the best option for small teams like mine.

I’m thinking now to streamline the scope of my project, convert as much as possible MySQL data to MongoDB and keep the REST interface when it’s the only choice like connect to google drive.

Thanks for the replies guys. My plan going forward is to stick with pub/sub but try and use methods as much as possible so when switching to apollo it shouldn’t cause to much overhead.