When will Postgresql support be fully integrated into Meteor?

When will Postgresql support be fully integrated into Meteor?


We have had some experiments in the past, but we established that they didn’t lead down the path to a production quality solution. @justinsb and I are working on some ideas, hope to announce something concrete soon.

@tidee If you don’t mind using GraphQL you can use Postgresql today! :smile:

I’m using it with RethinkDB and it’s been working really well. However, GraphQL doesn’t have a spec for streaming data quite yet (in the works). Keeping users in the Mongo database keeps things easy with auth and the rest could be stored in Postgres (or any other db).

@SkinnyGeek1010 I’m looking into GraphQL and Relay and how hooking something other than Mongo would be possible. Do you have a sample code base I could take a look at ? :stuck_out_tongue:

1 Like

@kamek I don’t have one with Mongo (personally i’m done using it on new projects) but I just released one for RethinkDB here:

RethinkDB Example App (via GraphQL)

However, Arunoda has one with Mongo as well as a function to ‘promisify’ the build in Mongo driver (honestly you could wrap that to have a nicer API but the demo is supposed to be explicit):

His demo also has a view layer which my example app is just a server only. He has a much simpler version of Relay which also has Meteor specific features.

@SkinnyGeek1010 Nice, thanks for sharing this ! However, as you said in your readme, GraphQL doesn’t seem to have real time support built-in at the moment, yet that’s what makes Meteor interesting IMO.
I think I’ll just wait for GraphQL to mature a bit.

1 Like

@kamek You could also do long polling which is fairly simple when you don’t have huge scale, then when realtime settles out you can just swap the ‘poll every 20 seconds’ code for a realtime subscription.

Also, I found out you can just use fibers so with mongo it’s just like:

 recentPost: {
      type: BlogPost,
      resolve() {
        docId = Things.insert({title: 'adam', content: 'a mongo blog'})
        doc = Things.findOne(docId)
        return doc;