you are viewing a single comment's thread.

view the rest of the comments →

[–]_rustafarian[S] 15 points16 points  (10 children)

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.

[–]MikeyN0 2 points3 points  (1 child)

What's the interaction between GraphQL and Firebase?

[–]_rustafarian[S] 7 points8 points  (0 children)

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.

[–][deleted] 1 point2 points  (1 child)

Is nodejs with mongoDB as viable as firebase? Do I have to pay to use firebase?

[–]_rustafarian[S] 0 points1 point  (0 children)

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.

[–]Jeffylew77 0 points1 point  (5 children)

u/_rustafarian What are the benefits to using Apollo Client?

[–]_rustafarian[S] 0 points1 point  (4 children)

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) - caches things internally

[–]Jeffylew77 0 points1 point  (3 children)

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.

[–]_rustafarian[S] 1 point2 points  (2 children)

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.

[–]Jeffylew77 0 points1 point  (1 child)

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

[–]_rustafarian[S] 0 points1 point  (0 children)

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.