server: update the logic of fetching stored introspection and fix evaluating partial stored introspection

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9489
GitOrigin-RevId: e18a6d32c7dcf4d4af077c72cffb6e4498ef838f
This commit is contained in:
Rakesh Emmadi 2023-06-09 02:01:39 +05:30 committed by hasura-bot
parent 77786f2a6d
commit 89ca064db5

View File

@ -387,11 +387,11 @@ buildSourcesIntrospectionStatus sourcesMetadata remoteSchemasMetadata = \case
[(RemoteSchemaName, remoteSchemaIntrospection)] ->
Bool
allSourcesAndRemoteSchemasCollected sources remoteSchemas =
allPresent sourcesMetadata (map fst sources)
&& allPresent remoteSchemasMetadata (map fst remoteSchemas)
allPresent (map fst sources) sourcesMetadata
&& allPresent (map fst remoteSchemas) remoteSchemasMetadata
allPresent :: (Hashable a) => InsOrdHashMap a b -> [a] -> Bool
allPresent hashMap = all (`InsOrdHashMap.member` hashMap)
allPresent :: (Hashable a) => [a] -> InsOrdHashMap a b -> Bool
allPresent list = all (`elem` list) . InsOrdHashMap.keys
{- Note [Avoiding GraphQL schema rebuilds when changing irrelevant Metadata]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~