graphql-engine/server
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
..
bench-wrk server, pro: actually reformat the code-base using ormolu 2021-09-23 22:57:37 +00:00
benchmarks benchmarks: skip failing remote_schema suite 2021-11-17 13:00:45 +00:00
documentation pass MSSQL_SA_PASSWORD to mssql container, and add MSSQL_HOST 2021-11-25 10:23:53 +00:00
packaging ci: create non-root user hasura in graphql engine docker images 2021-09-14 08:18:20 +00:00
src-exec server/tests: initial work on a test suite for DB-to-DB joins 2021-10-20 20:02:34 +00:00
src-lib Changed RemoteSchemaIntrospection's internal representation from a list to a hashmap. 2021-11-30 14:47:50 +00:00
src-rsr Use left join instead of lateral join to fetch foreign key constraints 2021-11-23 15:19:49 +00:00
src-test Changed RemoteSchemaIntrospection's internal representation from a list to a hashmap. 2021-11-30 14:47:50 +00:00
tests/integration server: make /healthz action clearer 2021-11-17 17:59:39 +00:00
tests-hspec multitenant: support for event disabling 2021-11-30 12:32:26 +00:00
tests-py Refactor remote schema customization 2021-11-30 00:38:27 +00:00
.dockerignore update packages (#251) 2018-08-08 13:10:13 +05:30
.gitignore server/citus: feature branch 2021-05-21 02:47:51 +00:00
.hlint.yaml ci: improve hlint messages 2021-05-04 21:52:55 +00:00
commit_diff.txt Rewrite GraphQL schema generation and query parsing (close #2801) (#4111) 2020-08-21 12:27:01 -05:00
COMPILING-ON-M1.md Add instructions for compiling graphql-engine natively on M1 2021-11-24 09:59:10 +00:00
CONTRIBUTING.md server/docs: link to STYLE from CONTRIBUTING 2021-10-21 11:34:50 +00:00
graphql-engine.cabal Refactor remote schema customization 2021-11-30 00:38:27 +00:00
Makefile server/tests: initial work on a test suite for DB-to-DB joins 2021-10-20 20:02:34 +00:00
Setup.hs server, pro: actually reformat the code-base using ormolu 2021-09-23 22:57:37 +00:00
STYLE.md server, CI: use ormolu as a formatter for Haskell sources 2021-09-23 21:23:21 +00:00