graphql-engine/server/src-lib/Hasura/RQL/DDL
Antoine Leblanc 40db3d7eab Resolve source customization at schema cache building time.
### Description

This PR attempts to fix several issues with source customization as it relates to remote relationships. There were several issues regarding casing: at the relationship border, we didn't properly set the target source's case, we didn't have access to the list of supported features to decide whether the feature was allowed or not, and we didn't have access to the global default.

However, all of that information is available when we build the schema cache, as we do resolve the case of some elements such as function names: we can therefore resolve source information at the same time, and simplify both the root of the schema and the remote relationship border.

To do this, this PR introduces a new type, `ResolvedSourceCustomization`, to be used in the Schema Cache, as opposed to the metadata's `SourceCustomization`, following a pattern established by a lot of other types.

### Remaining work and open questions

One major point of confusion: it seems to me that we didn't set the case at all across remote relationships, which would suggest we would use the case of the LHS source across the subset of the RHS one that is accessible through the remote relationship, which would in turn "corrupt" the parser cache and might result in the wrong case being used for that source later on. Is that assesment correct, and was I right to fix it?

Another one is that we seem not to be using the local case of the RHS to name the field in an object relationship; unless I'm mistaken we only use it for array relationships? Is that intentional?

This PR is also missing tests that would show-case the difference, and a changelog entry. To my knowledge, all the tests of this feature are in the python test suite; this could be the opportunity to move them to the hspec suite, but this might be a considerable amount of work?

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5619
GitOrigin-RevId: 51a81b713a74575e82d9f96b51633f158ce3a47b
2022-09-12 16:07:26 +00:00
..
Metadata Gardening: Cleanup Metadata Types Module 2022-08-10 23:19:25 +00:00
Permission Define IR types for AggregationPredicates. 2022-08-19 15:41:47 +00:00
Relationship Remove strictness annotations from data types in the Hasura.RQL hierarchy 2022-08-01 09:33:35 +00:00
RemoteRelationship Remove strictness annotations from data types in the Hasura.RQL hierarchy 2022-08-01 09:33:35 +00:00
RemoteSchema Remove strictness annotations from data types in the Hasura.RQL hierarchy 2022-08-01 09:33:35 +00:00
Schema Resolve source customization at schema cache building time. 2022-09-12 16:07:26 +00:00
Webhook Moving kriti function references into a single module for coordination of availability 2022-07-21 07:07:29 +00:00
Action.hs Remove strictness annotations from data types in the Hasura.RQL hierarchy 2022-08-01 09:33:35 +00:00
ApiLimit.hs Remove RQL/Types.hs 2022-04-27 13:58:47 +00:00
ComputedField.hs Remove strictness annotations from data types in the Hasura.RQL hierarchy 2022-08-01 09:33:35 +00:00
CustomTypes.hs Resolve source customization at schema cache building time. 2022-09-12 16:07:26 +00:00
DataConnector.hs Data Connectors: List Capabilties Metadata Endpoint 2022-09-02 17:51:19 +00:00
Endpoint.hs Remove RQL/Types.hs 2022-04-27 13:58:47 +00:00
EventTrigger.hs server, pro: event trigger auto cleanup (increment 1) 2022-09-09 08:28:31 +00:00
GraphqlSchemaIntrospection.hs Remove RQL/Types.hs 2022-04-27 13:58:47 +00:00
Headers.hs server: add explicit export lists in OSS server and enforce with warning 2021-11-04 16:09:38 +00:00
InheritedRoles.hs Remove RQL/Types.hs 2022-04-27 13:58:47 +00:00
Metadata.hs server/pro: enable health check on data sources and report via logging and API 2022-09-02 06:34:29 +00:00
Network.hs Remove RQL/Types.hs 2022-04-27 13:58:47 +00:00
Permission.hs Server: Enable streaming subscriptions by default 2022-08-25 08:24:26 +00:00
QueryCollection.hs server: add rename_query_collection metadata API 2022-08-19 13:37:16 +00:00
QueryTags.hs Replace BackendSourceMetadata type alias with a newtype 2022-08-29 00:59:18 +00:00
Relationship.hs Remove strictness annotations from data types in the Hasura.RQL hierarchy 2022-08-01 09:33:35 +00:00
RemoteRelationship.hs Resolve source customization at schema cache building time. 2022-09-12 16:07:26 +00:00
RemoteSchema.hs Move SchemaOptions to its own module, remove magic bools 2022-07-14 17:59:01 +00:00
ScheduledTrigger.hs server: do not serialize env vars in logs or errors: PR III - Event Triggers 2022-06-05 20:28:13 +00:00
Schema.hs Remove strictness annotations from data types in the Hasura.RQL hierarchy 2022-08-01 09:33:35 +00:00
SourceKinds.hs Push capabilities resolution code into BackendMetadata type class 2022-09-05 02:44:10 +00:00