graphql-engine/server/src-lib/Hasura/RQL/DDL
Antoine Leblanc f7071b3c93 Changed RemoteSchemaIntrospection's internal representation from a list to a hashmap.
### Description

This PR changes the internal representation of a parsed remote schema. We were still using a list of type definitions, meaning every time we were doing a type lookup we had to iterate through a linked list! 🙀 It was very noticeable on large schemas, that need to do a lot of lookups. This PR consequently changes the internal representation to a HashMap. Building the OneGraph schema on my machine now takes **23 seconds**, compared to **367 seconds** before this patch.

Some important points:
- ~~this PR removes a check for type duplication in remote schemas; it's unclear to me whether that's something we need to add back or not~~ (no longer true)
- this PR makes it obvious that we do not distinguish between "this remote schema is missing type X" and "this remote schema expects type X to be an object, but it's a scalar"; this PR doesn't change anything about it, but adds a comment where we could surface that error (see [2991](https://github.com/hasura/graphql-engine-mono/issues/2991))

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2963
GitOrigin-RevId: f5c96ad40f4e0afcf8cef635b4d64178111f98d3
2021-11-30 14:47:50 +00:00
..
Metadata server: provide option to recreate event triggers of specific or all sources in reload_metadata 2021-11-10 14:35:21 +00:00
Permission server: add explicit export lists in OSS server and enforce with warning 2021-11-04 16:09:38 +00:00
Relationship server, pro: actually reformat the code-base using ormolu 2021-09-23 22:57:37 +00:00
RemoteRelationship server, pro: actually reformat the code-base using ormolu 2021-09-23 22:57:37 +00:00
RemoteSchema Changed RemoteSchemaIntrospection's internal representation from a list to a hashmap. 2021-11-30 14:47:50 +00:00
Schema multitenant: support for event disabling 2021-11-30 12:32:26 +00:00
Action.hs Move Request Transform into the Action Definition 2021-10-29 04:13:29 +00:00
ApiLimit.hs server: add explicit export lists in OSS server and enforce with warning 2021-11-04 16:09:38 +00:00
ComputedField.hs server/mssql: add cascade to mssql_run_sql 2021-10-22 14:50:13 +00:00
CustomTypes.hs server, pro: actually reformat the code-base using ormolu 2021-09-23 22:57:37 +00:00
Endpoint.hs server, pro: actually reformat the code-base using ormolu 2021-09-23 22:57:37 +00:00
EventTrigger.hs server/mssql: add cascade to mssql_run_sql 2021-10-22 14:50:13 +00:00
GraphqlSchemaIntrospection.hs server: add explicit export lists in OSS server and enforce with warning 2021-11-04 16:09:38 +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 server: enable inherited roles by default 2021-10-05 12:29:32 +00:00
Metadata.hs server: provide option to recreate event triggers of specific or all sources in reload_metadata 2021-11-10 14:35:21 +00:00
Network.hs server: add explicit export lists in OSS server and enforce with warning 2021-11-04 16:09:38 +00:00
Permission.hs server: add explicit export lists in OSS server and enforce with warning 2021-11-04 16:09:38 +00:00
QueryCollection.hs server, pro: actually reformat the code-base using ormolu 2021-09-23 22:57:37 +00:00
QueryTags.hs server: add explicit export lists in OSS server and enforce with warning 2021-11-04 16:09:38 +00:00
Relationship.hs server/mssql: add cascade to mssql_run_sql 2021-10-22 14:50:13 +00:00
RemoteRelationship.hs Source typename customization (close graphql-engine#6974) 2021-10-29 14:43:14 +00:00
RemoteSchema.hs server: provide option to recreate event triggers of specific or all sources in reload_metadata 2021-11-10 14:35:21 +00:00
RequestTransform.hs Updates kriti pin to 0.2.1 2021-10-28 00:26:30 +00:00
ScheduledTrigger.hs server, pro: actually reformat the code-base using ormolu 2021-09-23 22:57:37 +00:00
Schema.hs server, pro: actually reformat the code-base using ormolu 2021-09-23 22:57:37 +00:00