graphql-engine/server/src-lib
Antoine Leblanc 0a1628c0cc Clean AppEnv and AppContext passing, remove RunT, reduce ServerConfigCtx uses
## Description

This PR does several different things that happen to overlap; the most important being:
- it removes `RunT`: it was redundant in places where we already had `Handler`, and only used in one other place, `SchemaUpdate`, for which a local `SchemaUpdateT` is more than enough;
- it reduces the number of places where we create a `ServerConfigCtx`, since now `HasServerConfigCtx` can be implemented directly by `SchemaUpdateT` and `Handler` based on the full `AppContext`;
- it drastically reduces the number of arguments we pass around in the app init code, by introducing `HasAppEnv`;
- it simplifies `HandlerCtx` to reduce duplication

In doing so, this changes paves the way towards removing `ServerConfigCtx`, since there are only very few places where we construct it: we can now introduce smaller classes than `HasServerConfigCtx`, that expose only a relevant subset of fields, and implement them where we now implement `HasServerConfigCtx`.

This PR is loosely based on ideas in #8337, that are no longer applicable due to the changes introduced in #8159. A challenge of this PR was the postgres tests, which were running in `PGMetadataStorageAppT CacheBuild` 🙀

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8392
GitOrigin-RevId: b90c1359066d20dbea329c87762ccdd1217b4d69
2023-03-21 10:45:56 +00:00
..
Autodocodec server: codecs for api limits 2023-03-15 01:38:52 +00:00
Control chore: Fix all outstanding hlint hints 2023-02-20 17:43:28 +00:00
Data server: fix scheduled events not showing up on console when the payload construction is failed 2023-03-14 12:28:49 +00:00
Database/MSSQL Source catalog migrations minor enhancements 2022-11-01 22:42:40 +00:00
GHC Add allocation counter to trace spans and trace metadata 2022-08-18 21:57:59 +00:00
Hasura Clean AppEnv and AppContext passing, remove RunT, reduce ServerConfigCtx uses 2023-03-21 10:45:56 +00:00
Net server: vendor used bits of 'ip' package to cut dependencies 2022-06-20 23:16:51 +00:00
Network server: rename SchemaCacheRef to AppStateRef and add AppContext to it 2023-03-17 10:30:38 +00:00