graphql-engine/server/src-lib/Hasura/RQL/DDL
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
..
Metadata server: warning in replace_metadata API 2023-02-20 14:20:38 +00:00
Permission chore(server): move perms to custom return types 2023-04-04 12:46:51 +00:00
Relationship Fixing omit_tracked argument to suggest_relationships API to be more granular 2023-02-10 01:53:30 +00:00
Schema Remove ServerConfigCtx. 2023-04-04 16:01:42 +00:00
Webhook Simplify Transformable Requests Module 2023-03-22 00:01:07 +00:00
Action.hs server: refactor Hasura.Metadata.Class 2023-04-03 13:36:50 +00:00
ApiLimit.hs multitenant, server: throw a warning if user sets a time limit greater than the system limit 2023-03-13 11:45:45 +00:00
ComputedField.hs Upgrade Ormolu to v0.5. 2022-11-02 20:55:13 +00:00
ConnectionTemplate.hs server: add connection_template as an argument in pg_test_connection_template API 2023-04-03 14:27:12 +00:00
CustomTypes.hs Upgrade Ormolu to v0.5. 2022-11-02 20:55:13 +00:00
DataConnector.hs server: codecs for backend configs 2023-03-30 15:53:55 +00:00
Endpoint.hs Remove MetadataStorageT, clean up error handling. 2023-02-03 01:05:09 +00:00
EventTrigger.hs feature(server): custom return types as discreet metadata entity 2023-03-30 15:15:11 +00:00
FeatureFlag.hs Remove ServerConfigCtx. 2023-04-04 16:01:42 +00:00
GraphqlSchemaIntrospection.hs Remove HasServerConfigCtx from the schema cache build. 2023-03-27 17:44:27 +00:00
Headers.hs server: event trigger codecs 2022-12-15 20:38:21 +00:00
InheritedRoles.hs Collect Metadata dependencies in a Sequence rather than a list 2022-11-30 18:13:31 +00:00
Metadata.hs chore(server): move perms to custom return types 2023-04-04 12:46:51 +00:00
Network.hs console: support suffix for tls allow list 2023-02-15 10:26:41 +00:00
OpenTelemetry.hs server: update metadata api for the OpenTelemetry exporter 2022-11-23 07:54:53 +00:00
Permission.hs chore(server): move perms to custom return types 2023-04-04 12:46:51 +00:00
QueryCollection.hs Clean up Hasura.Prelude a bit 2022-10-03 21:50:53 +00:00
QueryTags.hs chore(server): move some query tags code to a sensible place 2023-03-30 21:19:38 +00:00
Relationship.hs Collect Metadata dependencies in a Sequence rather than a list 2022-11-30 18:13:31 +00:00
RemoteRelationship.hs Block adding remote relationships where they are not supported by the Data Connector agent 2023-03-08 06:01:04 +00:00
ScheduledTrigger.hs server: refactor Hasura.Metadata.Class 2023-04-03 13:36:50 +00:00
Schema.hs chore(server): move user-defined-functions into Hasura.Function.* 2023-04-03 10:20:20 +00:00
SourceKinds.hs server: codecs for backend configs 2023-03-30 15:53:55 +00:00
Warnings.hs server: warning in replace_metadata API 2023-02-20 14:20:38 +00:00