graphql-engine/server
Antoine Leblanc 512a4dbb92 Use a different reader context for sources and remote schemas with new SchemaT monad.
### Description

This PR changes all the schema code to operate in a specific `SchemaT` monad, rather than in an arbitrary `m` monad. `SchemaT` is intended to be used opaquely with `runSourceSchema` and `runRemoteSchema`. The main goal of this is to allow a different reader context per part of the schema: this PR also minimizes the contexts. This means that we no longer require `SchemaOptions` when building remote schemas' schema, and this PR therefore removes a lot of dummy / placeholder values accordingly.

### Performance and stacking

This PR has been through several iterations. #5339 was the original version, that accomplished the same thing by stacking readers on top of the stack at every remote relationship boundary. This raised performance concerns, and @0x777 confirmed with an ad-hoc test that in some extreme cases we could see up to a 10% performance impact. This version, while more verbose, allows us to unstack / re-stack the readers, and avoid that problem. #5517 adds a new benchmark set to be able to automatically measure this on every PR.

### Remaining work

- [x] a comment (or perhaps even a Note?) should be added to `SchemaT`
- [x] we probably want for #5517 to be merged first so that we can confirm the lack of performance penalty

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5458
GitOrigin-RevId: e06b83d90da475f745b838f1fd8f8b4d9d3f4b10
2022-09-06 16:49:23 +00:00
..
bench-wrk server/tests-py: Reduce the number of locations we check the status code. 2022-07-05 18:01:07 +00:00
benchmarks server/ci/benchmarks: incorporate ad-hoc queries into benchmark reports 2022-09-01 20:48:13 +00:00
documentation server/postgres: test identifier uniqueness rewrite 2022-06-17 10:44:18 +00:00
lib server: Move the schema parsers to their own library. 2022-08-05 13:53:39 +00:00
src-dc-api Gdc capabilities scalar types - GDW-87 2022-09-06 04:26:03 +00:00
src-emit-metadata-openapi server: initial set of DTO types for metadata 2022-06-27 16:33:31 +00:00
src-exec server: accept extensions_schema while adding a source 2022-08-10 09:42:09 +00:00
src-lib Use a different reader context for sources and remote schemas with new SchemaT monad. 2022-09-06 16:49:23 +00:00
src-rsr ci: tag release v2.11.1 2022-08-31 14:17:54 +00:00
src-test Use a different reader context for sources and remote schemas with new SchemaT monad. 2022-09-06 16:49:23 +00:00
tests-dc-api Fix DateTimes in expected test output 2022-09-06 07:00:33 +00:00
tests-hspec Gdc capabilities scalar types - GDW-87 2022-09-06 04:26:03 +00:00
tests-py Improve error reporting by tracking more Metadata origins 2022-09-06 14:19:48 +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
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 tooling: Opt-in shared tooling 2022-06-16 17:12:35 +00:00
CONTRIBUTING.md Use docker compose, not docker-compose. 2022-08-02 10:30:57 +00:00
graphql-engine.cabal Gdc capabilities scalar types - GDW-87 2022-09-06 04:26:03 +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 server: testing guidelines 2022-03-08 09:53:27 +00:00
troubleshooting.md Create troubleshooting.md 2022-05-30 09:18:44 +00:00
VERSIONS.json server: Automate generation and verification of Cabal files from hpack. 2022-07-29 16:22:12 +00:00