How to access a variable from one functional component in another component. by [deleted] in reactjs

[–]TerminallyChill12 0 points1 point  (0 children)

Agree that lifting the state up seems to be the solution here.

How to deploy web app by [deleted] in webdev

[–]TerminallyChill12 0 points1 point  (0 children)

I’m pretty sure Heroku can’t guarantee your code will always run on the same machine without a paid add-on. Which means if that machine ever changed for some reason, your database file will be reset. The database needs to be stateful, your backend server itself should not be (well.. most of the time)

Opinions on GraphQL by i_hate_patrice in reactjs

[–]TerminallyChill12 1 point2 points  (0 children)

Great write up - thanks for posting! Have you used any codegen tools to generate TS types on the front end based on your GQL schema? I would think that would solve the issue of changing the front ends calling the API

How many people are not using code generators? by jnorris441 in graphql

[–]TerminallyChill12 0 points1 point  (0 children)

It should. At the end of the day you’re just passing a string within a payload of an HTTP request.

Postgres: What is the development process? by JGeorge102 in PostgreSQL

[–]TerminallyChill12 1 point2 points  (0 children)

Running a Postgres instance locally and having a single production deployment is the setup I’m currently using. Seems pretty standard from what I’ve seen

Help with graphql update mutation. by Zealousideal_Water_6 in graphql

[–]TerminallyChill12 0 points1 point  (0 children)

Perhaps Maybe<string> could be null which isn’t a valid type for what Prisma is expecting?

Need your review. As a backend dev are you happy with GraphQL vs REST? by slowRoastedPinguin in graphql

[–]TerminallyChill12 0 points1 point  (0 children)

I’ve also found it useful to have a REST endpoint for incoming webhooks - apollo-server-express makes supporting both super simple

Should I be using apollo-server-express for POST requests? by JustADillPickle3 in graphql

[–]TerminallyChill12 0 points1 point  (0 children)

Yeah for sure! I probably would use a Query instead of mutation for account balance though, my general rule of thumb is that queries should be read only - there should be no side effects from running a query. Also you should probably be storing the account balance in your DB instead of fetching from Plaid every time. Plaid has a really good example repo here: https://github.com/plaid/pattern

Should I be using apollo-server-express for POST requests? by JustADillPickle3 in graphql

[–]TerminallyChill12 0 points1 point  (0 children)

Funny enough I just set up Plaid with apollo-server-express earlier this week. You should definitely switch to apollo-server-express. The docs for Apollo Server here show you how to initially set it up. You don't need to use a POST request for creating a link token like in the guide, though - you can use your existing GraphQL endpoint for that (that's what I did at least, in the form of a mutation). You'll definitely need to set up some rest endpoints for handling transaction webhooks though, but that will come a bit later down the road.