1
0
mirror of https://github.com/hasura/graphql-engine.git synced 2024-12-20 05:51:54 +03:00
graphql-engine/server/src-lib/Hasura
Antoine Leblanc 04d8f068b6 Remove explicit case on the backend tag in Cache
### Description

As part of the cache building process, we create / update / migrate the catalog that each DB uses as a place to store event trigger information. The function that decides how this should be done was doing an explicit `case ... of` on the backend tag, instead of delegating to one of the backend classes. The downsides of this is that:
- it adds a "friction point" where the backend matters in the core of the engine, which is otherwise written to be almost entirely backend-agnostic
- it creates imports from deep in the engine to the `Backends`, which we try to restrict to a very small set of clearly identified files (the `Instances` files)
- it is currently implemented using a "catch all" default case, which might not always be correct for new backends

This PR makes the catalog updating process a part of `BackendMetadata`, and cleans the corresponding schema cache code.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4457
GitOrigin-RevId: 592f0eaa97a7c38f4e6d4400e1d2353aab12c97e
2022-05-05 13:44:56 +00:00
..
Backends Remove explicit case on the backend tag in Cache 2022-05-05 13:44:56 +00:00
Base Added BackendConfig to allow sources to share configuration of Data Connectors [GDW-78] 2022-04-29 02:14:10 +00:00
Cache server, pro: actually reformat the code-base using ormolu 2021-09-23 22:57:37 +00:00
Eventing server: refactor MaintenanceMode datatype 2022-04-28 20:56:11 +00:00
GraphQL server: refactor Hasura.GraphQL.Analyse 2022-05-04 10:57:55 +00:00
Incremental Added BackendConfig to allow sources to share configuration of Data Connectors [GDW-78] 2022-04-29 02:14:10 +00:00
Metadata Remove RQL/Types.hs 2022-04-27 13:58:47 +00:00
RQL Remove explicit case on the backend tag in Cache 2022-05-05 13:44:56 +00:00
Server Data Connector Agent Configuration Schema [GDW-103] 2022-05-05 05:19:46 +00:00
SQL add some haddock annotations to AnyBackend.hs 2022-05-03 13:15:41 +00:00
App.hs Remove RQL/Types.hs 2022-04-27 13:58:47 +00:00
EncJSON.hs Fix JSON encoding issue (fix and ) 2022-04-05 19:11:30 +00:00
GC.hs server: add explicit export lists in OSS server and enforce with warning 2021-11-04 16:09:38 +00:00
HTTP.hs server: http ip blocklist (closes ) 2022-02-25 13:30:57 +00:00
Incremental.hs server, pro: actually reformat the code-base using ormolu 2021-09-23 22:57:37 +00:00
Logging.hs Yeet some default-extensions 2022-03-16 00:40:17 +00:00
Prelude.hs Initial GDW Query Generation 2022-04-08 06:49:40 +00:00
QueryTags.hs server: support query tags for MSSQL data sources 2022-04-28 19:34:45 +00:00
Session.hs Add remote relationships from remote schemas in schema parser generators 2022-03-14 16:22:50 +00:00
Tracing.hs Remove Unique from Definition 2021-12-01 16:21:35 +00:00