graphql-engine/server/test-postgres
Antoine Leblanc 0476331136 small cleanups of pro's init
### Description

(This PR is better reviewed commit by commit.)

This PR is an aggregation of small incremental changes to Pro's init:
- it deletes some dead code,
- it starts reorganizing the code of that file by sections, similar to OSS' init,
- it extracts and cleans up license key cache init (groups several blocks of code in one separate function)
- makes some changes to a service class to reduce the dependency on `_acAppStateRef`

This PR is a first step: our goal is to move the schema cache build _in_ the app monad, in order to achieve #8344. To do so, we will need to remove `_acAppStateRef` from Pro's `AppContext`. There are two different paths we can take from here, which is why i cut this PR here:
- the first would be to change the different instances we implement on `AppM` to take as an argument the parts of the schema cache they depend on, rather than reading them from `_acAppStateRef`; as of this PR, `MetricsConfig` is the only such field;
- the second would be to apply the same strategy we already used for the TLSAllowList, and use a `IORef` that can be updated after the schema cache is built; this change would have a smaller footprint, but introduces one new `IORef` per such field, which feels something we don't want to generalize

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8655
GitOrigin-RevId: 809697d460bdb5c83ef7d30a2e835f589bcd80a6
2023-04-06 15:37:15 +00:00
..
Test/Hasura small cleanups of pro's init 2023-04-06 15:37:15 +00:00
Constants.hs server: move apollo-federation to GA 2023-03-15 08:15:51 +00:00
Main.hs Make flag value a part of the cache's dynamic config. 2023-04-04 19:39:39 +00:00