graphql-engine/server/src-lib/Hasura/GraphQL/Schema
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
..
BoolExp Use a different reader context for sources and remote schemas with new SchemaT monad. 2022-09-06 16:49:23 +00:00
Action.hs Use a different reader context for sources and remote schemas with new SchemaT monad. 2022-09-06 16:49:23 +00:00
Backend.hs Use a different reader context for sources and remote schemas with new SchemaT monad. 2022-09-06 16:49:23 +00:00
BoolExp.hs Use a different reader context for sources and remote schemas with new SchemaT monad. 2022-09-06 16:49:23 +00:00
Build.hs Use a different reader context for sources and remote schemas with new SchemaT monad. 2022-09-06 16:49:23 +00:00
Common.hs Use a different reader context for sources and remote schemas with new SchemaT monad. 2022-09-06 16:49:23 +00:00
Instances.hs Rename Data Wrapper to Data Connector [GDW-89] 2022-05-02 05:04:07 +00:00
Introspect.hs server: Remove QErr and Code dependencies from the schema parsers. 2022-07-27 12:26:44 +00:00
Mutation.hs Use a different reader context for sources and remote schemas with new SchemaT monad. 2022-09-06 16:49:23 +00:00
NamingCase.hs server: transform enum with upper for graphql-default 2022-07-19 06:56:45 +00:00
Node.hs remove homebrew NESeq, use vendored 2022-07-19 08:42:28 +00:00
Options.hs Parse dont validate dangerous boolean collapse 2022-08-26 04:38:41 +00:00
OrderBy.hs Use a different reader context for sources and remote schemas with new SchemaT monad. 2022-09-06 16:49:23 +00:00
Parser.hs server: refactor MonadSchema into MonadMemoize 2022-08-04 13:45:53 +00:00
Postgres.hs Use a different reader context for sources and remote schemas with new SchemaT monad. 2022-09-06 16:49:23 +00:00
Relay.hs Use a different reader context for sources and remote schemas with new SchemaT monad. 2022-09-06 16:49:23 +00:00
Remote.hs Use a different reader context for sources and remote schemas with new SchemaT monad. 2022-09-06 16:49:23 +00:00
RemoteRelationship.hs Use a different reader context for sources and remote schemas with new SchemaT monad. 2022-09-06 16:49:23 +00:00
Select.hs Use a different reader context for sources and remote schemas with new SchemaT monad. 2022-09-06 16:49:23 +00:00
SubscriptionStream.hs Use a different reader context for sources and remote schemas with new SchemaT monad. 2022-09-06 16:49:23 +00:00
Table.hs Use a different reader context for sources and remote schemas with new SchemaT monad. 2022-09-06 16:49:23 +00:00
Typename.hs Move MkTypename and NamingCase into their own modules. 2022-07-12 14:01:28 +00:00
Update.hs Use a different reader context for sources and remote schemas with new SchemaT monad. 2022-09-06 16:49:23 +00:00