graphql-engine/server/src-lib/Hasura/GraphQL/Execute
Vladimir Ciobanu da8f6981d4 server: reduce the number of backend dispatches
Fixes https://github.com/hasura/graphql-engine-mono/issues/712

Main point of interest: the `Hasura.SQL.Backend` module.

This PR creates an `Exists` type indexed by indexed type and packed constraint while hiding all of its complexity by not exporting the constructor.

Existential constructors/types which are no longer (directly) existential:
- [X] BackendSourceInfo :: BackendSourceInfo
- [x] BackendSourceMetadata :: BackendSourceMetadata
- [x] MOSourceObjId :: MetadatObjId
- [x] SOSourceObj :: SchemaObjId
- [x] RFDB :: RootField
- [x] LQP :: LiveQueryPlan
- [x] ExecutionStep :: ExecStepDB

This PR also removes ALL usages of `Typeable.cast` from our codebase. We still need to derive `Typeable` in a few places in order to be able to derive `Data` in one place. I have not dug deeper to see why this is needed.

GitOrigin-RevId: bb47e957192e4bb0af4c4116aee7bb92f7983445
2021-03-15 13:03:55 +00:00
..
Action server: remove Action.hs-boot file 2021-03-10 07:27:19 +00:00
LiveQuery server: add MSSQL support 2021-02-23 17:38:36 +00:00
Action.hs server: remove Action.hs-boot file 2021-03-10 07:27:19 +00:00
Backend.hs server: reduce the number of backend dispatches 2021-03-15 13:03:55 +00:00
Common.hs server: generalized LogQueryLog (fix #708) 2021-03-13 14:41:44 +00:00
Inline.hs server: allow fragments to use variables (fix hasura/graphql-engine#6303) (#225) 2020-12-22 10:42:34 +00:00
Insert.hs minor typo fixes (#165) 2021-03-04 06:36:15 +00:00
Mutation.hs server: reduce the number of backend dispatches 2021-03-15 13:03:55 +00:00
Plan.hs server: simplify JSON instances 2021-01-19 19:15:42 +00:00
Prepare.hs server: generalize execution of queries and mutations 2021-02-12 03:05:05 +00:00
Query.hs server: reduce the number of backend dispatches 2021-03-15 13:03:55 +00:00
Remote.hs server: generalize subscriptions 2021-02-20 13:46:43 +00:00
RemoteJoin.hs [Preview] Inherited roles for postgres read queries 2021-03-08 11:15:10 +00:00
Resolve.hs remove SQL.Text, clean text functions 2020-10-22 14:07:48 +01:00
Types.hs Rewrite GraphQL schema generation and query parsing (close #2801) (#4111) 2020-08-21 12:27:01 -05:00