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

Upgrade database? #20

Open
rjpalermo1 opened this issue Aug 22, 2017 · 3 comments
Open

Upgrade database? #20

rjpalermo1 opened this issue Aug 22, 2017 · 3 comments

Comments

@rjpalermo1
Copy link

rjpalermo1 commented Aug 22, 2017

Hi, you say in your intro that you will be using sqlite 'for now'. Are there plans to show an upgrade to postgres or mongo, etc?

Also, FYI if you are not aware there is a very interesting project called postgraphql you might be interested in. I am leaning hard in that direction as JS isn't in my toolbox yet and by what I am seeing I can eliminate the express/ruby/python back end server all-together and query direct to graphQL at the database...

@srtucker22
Copy link
Owner

Hey @rjpalermo1, I'd definitely be open to showing a migration to postgres or another DB in a future tutorial.

Right now, it's much easier to set up and run the tutorial with sqlite without additional DB setup and configuration, so that's why I took that route. The chatty tutorial is more about understanding how everything is connected under the hood. I don't really see sequelize as being a key feature of this tut, more a means to showing how you can create a gql server from whatever data source. But honestly, if you just swapped postgres for sqlite in this tut, the ORM code shouldn't really change at all and I wouldn't be surprised if everything just worked right away.

I'm a big fan of postgraphql. It's a terrific package. My only warning would be that if you're planning on making a real-time app, there are some key features that postgraphql still needs to figure out like subscriptions.

I'd also be wary of believing you can remove a backend server entirely. I've never come across a substantial app that didn't need some custom server logic or features behind it. A simple example might be storing image files -- if you wanted to use a service like S3, you need to write backend code that will shuffle those uploads there instead of Postgres. I'm all for minimizing backend code, but I doubt you'll be able to eliminate it.

Let me know your thoughts!

@Karsens
Copy link

Karsens commented Sep 3, 2017

,, But honestly, if you just swapped postgres for sqlite in this tut, the ORM code shouldn't really change at all and I wouldn't be surprised if everything just worked right away."
I've done this, tried mysql instead of sqlite, and it worked like a charm. 👍

@zillable
Copy link

zillable commented Oct 6, 2017

Refers two articles flexible database:
https://www.compose.com/articles/use-all-the-databases-part-1/
https://www.compose.com/articles/use-all-the-databases-part-2/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants