graphql-engine/server
Antoine Leblanc 306162f477 Remove ServerConfigCtx.
### Description

This PR removes `ServerConfigCtx` and `HasServerConfigCtx`. Instead, it favours different approaches:
- when the code was only using one field, it passes that field explicitly (usually `SQLGenCtx` or `CheckFeatureFlag`)
- when the code was using several fields, but in only one function, it inlines
- for the cache build, it introduces `CacheStaticConfig` and `CacheDynamicConfig`, which are subsets of `AppEnv` and `AppContext` respectively

The main goal of this is to help with the modularization of the engine: as `ServerConfigCtx` had fields whose types were imported from several unrelated parts of the engine, using it tied together parts of the engine that should not be aware of one another (such as tying together `Hasura.LogicalModel` and `Hasura.GraphQL.Schema`).

The bulk of this PR is a change to the cache build, as a follow up to #8509: instead of giving the entire `ServerConfigCtx` as a incremental rule argument, we only give the new `CacheDynamicConfig` struct, which has fewer fields. The other required fields, that were coming from the `AppEnv`, are now given via the `HasCacheStaticConfig` constraint, which is a "subset" of `HasAppEnv`.

(Some further work could include moving `StringifyNumbers` out of `GraphQL.Schema.Options`, given how it is used all across the codebase, including in `RQL.DML`.)

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8513
GitOrigin-RevId: 818cbcd71494e3cd946b06adbb02ca328a8a298e
2023-04-04 16:01:42 +00:00
..
benchmarks Revert "server/benchmarks: update the postgres version to 15" 2023-03-13 15:27:38 +00:00
documentation Fix haskell error in example code block 2023-04-04 11:28:35 +00:00
lib Implement get_source_tables command for all backends 2023-04-04 15:27:19 +00:00
src-emit-metadata-openapi harmonize network manager handling 2023-02-22 15:55:54 +00:00
src-exec server: core changes for zero-downtime env vars update on cloud 2023-03-30 16:33:39 +00:00
src-lib Remove ServerConfigCtx. 2023-04-04 16:01:42 +00:00
src-rsr server: revert changes to created_at column of 'hdb_catalog.event_log' 2023-03-29 10:33:30 +00:00
src-test validate logical models custom return type against postgres 2023-04-04 14:02:59 +00:00
test-manual server/test-manual: A way to start PostgreSQL with a read replica. 2023-03-28 09:20:51 +00:00
test-mssql server: Split the integration tests out into their own directories. 2022-11-17 12:56:26 +00:00
test-postgres Remove ServerConfigCtx. 2023-04-04 16:01:42 +00:00
tests-py chore(tests): explicitly set BigQuery retry limit in py-tests 2023-03-28 10:42:00 +00:00
.dockerignore update packages (#251) 2018-08-08 13:10:13 +05:30
.gitignore server: Clean up Cabal project files 2022-04-07 07:16:12 +00:00
.ormolu Upgrade Ormolu to v0.5. 2022-11-02 20:55:13 +00:00
commit_diff.txt Rewrite GraphQL schema generation and query parsing (close #2801) (#4111) 2020-08-21 12:27:01 -05:00
COMPILING-ON-MACOS.md frontend: switch cli and server to use the new nx assets 2023-01-25 12:07:01 +00:00
CONTRIBUTING.md nix: Switch to nixpkgs-unstable. 2023-03-24 20:36:48 +00:00
graphql-engine.cabal Remove ServerConfigCtx. 2023-04-04 16:01:42 +00:00
Makefile ci: misc. cleanup, naming 2022-01-03 06:26:39 +00:00
STYLE.md Nix: Use nixpkgs-fmt to format everything. 2022-06-20 13:02:45 +00:00
testing-guidelines.md Extract the test harness from the Hspec tests 2022-10-04 08:31:26 +00:00
troubleshooting.md Create troubleshooting.md 2022-05-30 09:18:44 +00:00
VERSIONS.json nix: Switch to nixpkgs-unstable. 2023-03-24 20:36:48 +00:00