graphql-engine/server/src-lib/Hasura/Backends/DataConnector/Adapter
Auke Booij 83ea4a254d server: plumb StoredIntrospection while building the Schema Cache
We'd like to be able to build a Schema Cache from only serializable data. We already have Metadata. The data that's missing to build a Schema Cache is referred to as "stored introspection", and this includes:
- DB introspection
- User-defined enum values (i.e. contents of specific DB tables)
- Remote schema introspection

This PR introduces a new `StoredIntrospection` container that holds that data, and plumbs it through to the right parts of the schema cache building process, so that stored introspection can be used as a substitute for fresh introspection requests against live data sources.

The serialization of `StoredIntrospection` is intended to be straightforward: just take the serialized source introspection results, and put them in an appropriate JSON object. Though I don't think that this PR achieves that entirely.

In order for `StoredIntrospection` to be deserializable (through `aeson` instances), while keeping the required code changes low, this piggy-backs off of the `ResolvedSource` data type. `ResolvedSource` is _almost_ exactly what we want, and _almost_ deserializable, so this PR brings it across the finish line by moving a few things out of that type, and adding a `FromJSON (RawFunctionInfo b)` context to the `Backend` type class.

[PLAT-270]: https://hasurahq.atlassian.net/browse/PLAT-270?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
[PLAT-270]: https://hasurahq.atlassian.net/browse/PLAT-270?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
[PLAT-276]: https://hasurahq.atlassian.net/browse/PLAT-276?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
[PLAT-276]: https://hasurahq.atlassian.net/browse/PLAT-276?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7053
GitOrigin-RevId: 5001b4ea086195cb5e65886747eac2a0a657b64c
2023-01-20 14:52:36 +00:00
..
Types Custom update column operator support for Data Connectors [GDC-688] 2023-01-19 04:22:58 +00:00
API.hs server: Add tablePermissionsCommands to DataConnector API 2022-10-12 01:44:36 +00:00
Backend.hs Remove builtin scalar types from Data Connector backend 2023-01-11 02:37:26 +00:00
ConfigTransform.hs Gardening: Code cleanup around config transformations for dataconnector backends 2023-01-11 23:13:26 +00:00
Execute.hs Data Connectors insert mutations support [GDC-609] 2023-01-17 00:35:22 +00:00
Metadata.hs server: plumb StoredIntrospection while building the Schema Cache 2023-01-20 14:52:36 +00:00
RunSQL.hs Upgrade Ormolu to v0.5. 2022-11-02 20:55:13 +00:00
Schema.hs Custom update column operator support for Data Connectors [GDC-688] 2023-01-19 04:22:58 +00:00
SchemaCache.hs Define IR types for AggregationPredicates. 2022-08-19 15:41:47 +00:00
Transport.hs Data Connectors insert mutations support [GDC-609] 2023-01-17 00:35:22 +00:00
Types.hs Remove builtin scalar types from Data Connector backend 2023-01-11 02:37:26 +00:00