graphql-engine/server/src-test/Test/Parser
Antoine Leblanc 42e5205eb5 server: reduce schema contexts to the bare minimum
### Description

This monster of a PR took way too long. As the title suggests, it reduces the schema context carried in the readers to the very strict minimum. In practice, that means that to build a source, we only require:
  - the global `SchemaContext`
  - the global `SchemaOptions` (soon to be renamed `SchemaSourceOptions`)
  - that source's `SourceInfo`

Furthermore, _we no longer carry "default" customization options throughout the schema_. All customization information is extracted from the `SourceInfo`, when required. This prevents an entire category of bugs we had previously encountered, such as parts of the code using uninitialized / unupdated customization info.

In turn, this meant that we could remove the explicit threading of the `SourceInfo` throughout the schema, since it is now always available through the reader context.

Finally, this meant making a few adjustments to relay and actions as well, such as the introduction of a new separate "context" for actions, and a change to how we create some of the action-specific postgres scalar parsers.

I'll highlight with review comments the areas of interest.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6709
GitOrigin-RevId: ea80fddcb24e2513779dd04b0b700a55f0028dd1
2022-11-17 10:35:54 +00:00
..
Delete.hs server/nada: add unit test infrastructure for Postgres delete SQL generation 2022-08-11 10:46:49 +00:00
Expectation.hs server: reduce schema contexts to the bare minimum 2022-11-17 10:35:54 +00:00
Field.hs feat(tests): Introduce AggregationPredicatesSpec 2022-09-07 12:10:52 +00:00
Insert.hs server/nada: use raw SQL literals to clarify tested queries 2022-08-18 11:32:03 +00:00
Internal.hs server: reduce schema contexts to the bare minimum 2022-11-17 10:35:54 +00:00
Monad.hs server: reduce schema contexts to the bare minimum 2022-11-17 10:35:54 +00:00