graphql-engine/server/src-test/Hasura
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
..
Generator server: IR Selection basic generators 2021-11-10 11:13:04 +00:00
GraphQL Changed RemoteSchemaIntrospection's internal representation from a list to a hashmap. 2021-11-30 14:47:50 +00:00
RQL server: IR Selection basic generators 2021-11-10 11:13:04 +00:00
Server [pro, server] Multiple Admin Secrets 2021-11-17 07:33:33 +00:00
SQL server, pro: actually reformat the code-base using ormolu 2021-09-23 22:57:37 +00:00
EventingSpec.hs server, pro: actually reformat the code-base using ormolu 2021-09-23 22:57:37 +00:00
Generator.hs Changed RemoteSchemaIntrospection's internal representation from a list to a hashmap. 2021-11-30 14:47:50 +00:00
IncrementalSpec.hs server, pro: actually reformat the code-base using ormolu 2021-09-23 22:57:37 +00:00
SessionSpec.hs server, pro: actually reformat the code-base using ormolu 2021-09-23 22:57:37 +00:00