VulcanJS / Vulcan

πŸŒ‹ A toolkit to quickly build apps with React, GraphQL & Meteor
http://vulcanjs.org
MIT License
7.98k stars 1.88k forks source link

Apollo Containers #1483

Closed SachaG closed 7 years ago

SachaG commented 7 years ago

This is a starter issue, highly inspired by the great job of the folks at Hoodie. πŸ‘

πŸŽƒπŸ™€πŸ‘•πŸ”­πŸ˜» Hacktoberfest: Trick or Treat!

If you haven’t yet, sign up for Hacktoberfest to earn an exclusive T-Shirt.

We are sure you can learn a cool trick or two in the process on how to hack & customize Telescope Nova! πŸ”­

πŸ€” What you will need to know

Meteor, React, Apollo, and GraphQL.

🎯 The Goal

Replace the various containers used in Telescope (which all use the react-list-container package) with Apollo/GraphQL equivalents.

Note: a container is a special component that doesn't display any HTML, but instead takes on the job of loading data from the server, before passing that data on to other components (thus preserving separation of concerns between containers and presentational components).

There's two types of containers in the current codebase, ListContainer (for multiple documents) and DocumentContainer (for single documents).

Additionally, a container can either subscribe to (i.e. load) data from the server and then pass it on, or just fetch data already stored in memory and then pass it on. With Apollo, the second use case would probably just be a Redux operation and not involve GraphQL.

πŸ“‹ Step by Step

Working on your first Pull Request? You can learn how from this free series How to Contribute to an Open Source Project on GitHub.


Ping us here, in the Telescope Slack room or on Twitter if you have any questions πŸ˜‰

I'll leave @xavcz complete this issue with more details :)

xavxyz commented 7 years ago

With Meteor package apollo@0.1.x, we may be able to get rid of the AppComposer container thanks to the current user edit: we still need this container (see boilerplate example)

We'll also be able to use the current user in our resolvers with the context (3rd parameter)

ghost commented 7 years ago

Can I claim this issue and work on it this week-end?

SachaG commented 7 years ago

@kytwb sure, that'd be great! Just indicate in this thread which container you're working on so we don't duplicate the work.

xavxyz commented 7 years ago

@kytwb awesome! πŸŽ‰ please join the Slack room: http://slack.telescopeapp.org

We are actively discussing there about Apollo, and especially this issue πŸ€”πŸš€

ghost commented 7 years ago

@SachaG @xavcz coming back to you and on Slack this week-end to get up to speed and start working on it πŸ˜„

xavxyz commented 7 years ago

Done πŸ‘Œ