mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-18 04:51:35 +03:00
f7071b3c93
### 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 |
||
---|---|---|
.. | ||
Backends | ||
Base | ||
Cache | ||
Eventing | ||
GraphQL | ||
Incremental | ||
Metadata | ||
RQL | ||
Server | ||
SQL | ||
App.hs | ||
EncJSON.hs | ||
GC.hs | ||
HTTP.hs | ||
Incremental.hs | ||
Logging.hs | ||
Prelude.hs | ||
QueryTags.hs | ||
Session.hs | ||
Tracing.hs |