Add a flag to enable state creation (#222)

* Add a flag to enable state creation

* Update flag in mock config for testing
This commit is contained in:
prathamesh0
2022-11-10 16:56:06 +05:30
committed by GitHub
parent 8d3c68873b
commit 861420a10f
12 changed files with 58 additions and 14 deletions
+2 -3
View File
@@ -98,9 +98,8 @@ export const instantiate = async (
const dbEntity = await database.saveEntity(entityName, dbData);
database.cacheUpdatedEntityByName(entityName, dbEntity);
// Update the in-memory subgraph state if not disabled.
// TODO: enableSubgraphState
if (!indexer.serverConfig.disableSubgraphState) {
// Update the in-memory subgraph state enabled
if (indexer.serverConfig.enableState) {
// Prepare diff data for the entity update
assert(indexer.getRelationsMap);
const diffData = prepareEntityState(dbData, entityName, indexer.getRelationsMap());