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.
1
u/_rustafarian Jan 03 '20
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