graphql-engine/server/src-lib/Hasura/GraphQL
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
..
Execute Clean AppEnv and AppContext passing, remove RunT, reduce ServerConfigCtx uses 2023-03-21 10:45:56 +00:00
Logging chore(server): split new statistics log from QueryLog 2023-03-15 13:06:47 +00:00
Schema feature(server): allow nullability in Logical Model arguments 2023-03-07 10:04:58 +00:00
Transport server: rename SchemaCacheRef to AppStateRef and add AppContext to it 2023-03-17 10:30:38 +00:00
Analyse.hs Upgrade Ormolu to v0.5. 2022-11-02 20:55:13 +00:00
ApolloFederation.hs server: move apollo-federation to GA 2023-03-15 08:15:51 +00:00
Context.hs server: runParse returns QErr 2022-06-16 12:22:30 +00:00
Execute.hs harmonize network manager handling 2023-02-22 15:55:54 +00:00
Explain.hs Allow backend execution to happen on the base app monad. 2023-02-09 14:40:04 +00:00
Logging.hs chore(server): split new statistics log from QueryLog 2023-03-15 13:06:47 +00:00
Namespace.hs Move MkTypename and NamingCase into their own modules. 2022-07-12 14:01:28 +00:00
ParameterizedQueryHash.hs Implement HLint suggestions and turn warnings into errors 2022-07-01 10:50:33 +00:00
RemoteServer.hs chore(server): remove some unused function arguments 2023-03-17 15:51:33 +00:00
Schema.hs server: move apollo-federation to GA 2023-03-15 08:15:51 +00:00