mirror of
https://github.com/cerc-io/watcher-ts
synced 2026-09-09 01:04:07 +00:00
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:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user