Hi there. I just wanted to showcase an app I was working on recently. It uses Typescript and Apollo Client on the front-end and GraphQL (Hasura) and firebase on the back-end. Please feel free to ask any questions.
I use firebase for authencation, so whenever a new user is created, a cloud function is triggered to store that user in my GraphQL backend. I also use cloud functions for sending SMS messages and making payments.
I like firebase better because I don't have to setup my own backend, maintain it or scale it. Firebase just handles all of that for me and it's very easy to get started with. As for pricing, It has a generous free plan and also there's a pay on the go plan, so you'd only pay for the resources you're using.
If you have a graphical backend, you have to use a GraphQL client on the front end and Apollo Client is most popular one. I like it because it is featreful and works really with the react. Here is somethings I like about it:
supports react hooks
provides the different UI states when fetching data (loading, error, data)
u/_rustafarian did you use Firebase cloud firestore as your database? That’s what I’m using and I’m looking to utilize in memory cache. I’m also redux, react redux, redux saga, and redux saga Firebase for global state/async calls if that changes anything.
No I'm not using firestore. The parts of firebase I'm using are hosting, cloud functions, authentication, analytics and crashlytics. I'm using Postgres for my database in combination with Hasura. https://github.com/hasura/graphql-engine.
Any reason you chose Postgres + hasura instead of cloud firestore? The app I’m building will eventually be used at scale, so I still trying to figure out the best path to go. Eventually I want to move over to AWS, but Firebase is easier to setup
Well I wanted a GraphQL backend and Hasura is just a joy to work with and it's very performent as well. It can handle hunderds of requests per second on a relatively cheap machine. I still use cloud functions but for other things like sending sms messages and making payments.
16
u/_rustafarian Jan 03 '20
Hi there. I just wanted to showcase an app I was working on recently. It uses Typescript and Apollo Client on the front-end and GraphQL (Hasura) and firebase on the back-end. Please feel free to ask any questions.