the-road-to-graphql / fullstack-apollo-express-postgresql-boilerplate

💥 A sophisticated GraphQL with Apollo, Express and PostgreSQL boilerplate project.
https://roadtoreact.com
MIT License
1.2k stars 265 forks source link

Universal Family of Boilerplate Projects #33

Closed rwieruch closed 5 years ago

rwieruch commented 5 years ago

What changed?

This repository only makes up the GraphQL server for the fullstack tech stack. The (React) GraphQL client was moved into its own GitHub repository.

The name of the repository was changed to fullstack-apollo-express-postgresql-boilerplate while the client application is called fullstack-apollo-react-boilerplate.

Motivation

The change should make it possible to come up with more than one matching client (e.g. Vue, Angular) but also to implement other servers (.e.g this one is running with PostgreSQL, but another one could be powered by MongoDB).

Case Study

There exists a first case study why I made this change. @rpweb and @priestor exchanged PostgreSQL with MongoDB. They forked the previous repository, but had to work with the React client too. That's why we had two React client applications side by side to maintain. Now it should be possible to remove the client and only work with the modified server while keeping a link to reusable client (e.g. https://github.com/the-road-to-graphql/fullstack-apollo-react-boilerplate) or any other clients being implemented in the future.

priestor commented 5 years ago

Nice, good call! :)

rpweb commented 5 years ago

Good approach!

rwieruch commented 5 years ago

@rpweb @priestor Thank you so much for your work. What do you think about the above mentioned motivation?

I would love to use both repositories as educational material (PostgreSQL version, MongoDB version). But the decision is up to you :) It would mean to align both versions so that they can be covered by the tutorial/book. For instance, for exchanging the database, only two sections (database, resolvers connection to database) of the tutorial would need to be changed. Everything else could be kept this way and people would be able to use MongoDB instead of PostgreSQL.

Otherwise I would go with a fork of your MongoDB version to keep the aberration between both repositories as minimal as possible (e.g. only changing resolvers, models and seeding in index.js). That means you could move forward with your MongoDB version and add more things to it. Would be great to hear your thoughts on this.

You have mentioned a couple of changes on your side over here: https://github.com/the-road-to-graphql/fullstack-apollo-express-postgresql-boilerplate/issues/31 If you like to collaborate on this, these would be the things that should be aligned:

Then I would write the two chapters as optional replacement for the tutorial (only if it is really as straight forward as I hope it to be at the moment). Of course, credits for the implementation would go to you! Anytime one of the two repositories introduces an update, we would need to align on this. Let me know what you think about it :)

rwieruch commented 5 years ago

However we move forward with this, you get the credit for the implementation! :)

rpweb commented 5 years ago

@rwieruch did you fork the correct one? i created a new fork on webstudios. sorry if this wasn't clear. https://github.com/webstudios/fullstack-apollo-react-express-boilerplate-project i will take care of the other points

rwieruch commented 5 years ago

I forked none. I simply striped out my client out from this repository. There are these projects now:

Whereas I merge the PR now and then you see the actual repo for this project.