impress-2020/src/server/types
Matchu 3744a476e5 Fix db transactions with pooling
Ah okay, pools support `query` and `execute` the same way connection objects do (as a shorthand for acquiring, querying, and releasing), but it doesn't have the same helpers for transactions. Makes sense: you need those queries to go to the same connection, and an API where you just call it against the pool object can't tell that it's part of the same thing!

Now, we have our transaction code explicitly acquire a connection to use for the duration of the transaction.

An alternative considered would have been to have `connectToDb` acquire a connection, and then release it at the end of the GraphQL request. That would have made app code simpler, but added a lot of additional potential surprise failure points to the infra imo (e.g. what if we're misunderstanding the GraphQL codepath and the connection never gets released? whereas here it's relatively easy to audit that there's a `finally` in the right spot.)
2022-01-08 18:49:00 -08:00
..
AppearanceLayer.js Use /api/assetImage for all image sizes 2021-08-19 17:56:09 -07:00
ClosetList.js Closet list dropdowns on item page 2021-11-30 16:36:00 -08:00
Item.js Fix db transactions with pooling 2022-01-08 18:49:00 -08:00
MutationsForSupport.js Fix db transactions with pooling 2022-01-08 18:49:00 -08:00
Outfit.js Fix db transactions with pooling 2022-01-08 18:49:00 -08:00
Pet.js Fix GraphQL docstrings 2021-05-27 16:51:31 -07:00
PetAppearance.js Fix GraphQL docstrings 2021-05-27 16:51:31 -07:00
User.js Send Vary: Authorization cache header 2021-11-23 13:00:56 -08:00
Zone.js Use ES module syntax in backend instead of require 2021-02-02 22:26:55 -08:00