diff --git a/src/utilities/indexer/queryCTypes.ts b/src/utilities/indexer/queryCTypes.ts index c5466695..91ab33b9 100644 --- a/src/utilities/indexer/queryCTypes.ts +++ b/src/utilities/indexer/queryCTypes.ts @@ -21,35 +21,7 @@ export async function queryCTypes() { const fromDate = latestCType ? latestCType.dataValues.createdAt : new Date(0); - // When modifying this query, first try it out on the https://indexer.kilt.io/ (or dev-indexer) and click on "Prettify" - // const writtenQuery = ` - // query { - // cTypes( - // filter: { registrationBlock: { id: { greaterThan: "${fromBlock}" } } } - // orderBy: REGISTRATION_BLOCK_ID_ASC - // # BlockIDs are strings, this means that "42" > "1000" - // # Sadly, time_stamps can only be use to order queries of blocks. - // ) { - // totalCount - // nodes { - // id - // author { - // ...DidNames - // } - // registrationBlock { - // ...wholeBlock - // } - // attestationsCreated - // attestationsRevoked - // attestationsRemoved - // validAttestations - // definition - // } - // } - // } - // ${wholeBlock} - // ${DidNames} - // `; + // When modifying queries, first try them out on https://indexer.kilt.io/ or https://dev-indexer.kilt.io/ const fieldsToQuery = [ 'id', diff --git a/src/utilities/indexer/updateAttestationCount.ts b/src/utilities/indexer/updateAttestationCount.ts index 7ccfa322..dbfde43c 100644 --- a/src/utilities/indexer/updateAttestationCount.ts +++ b/src/utilities/indexer/updateAttestationCount.ts @@ -7,25 +7,9 @@ import { CType as CTypeModel } from '../../models/ctype'; import { logger } from '../logger'; import { matchesGenerator } from './queryFromIndexer'; -// import { writeQuery } from './writeQuery'; export async function updateAttestationsCount() { - // When modifying this query, first try it out on the https://indexer.kilt.io/ (or dev-indexer) and click on "Prettify" - // const writtenQuery = ` - // query { - // attestationsCount: cTypes(orderBy: ID_ASC, first: ${QUERY_SIZE}, offset: 0 ) { - // # It does not matter what the order criterion is as long as it is consistent. - // totalCount - // nodes { - // cTypeId: id - // attestationsCreated - // registrationBlockId - // } - // } - // } - // `; const fields = ['cTypeId: id', 'attestationsCreated', 'registrationBlockId']; - // const writtenQuery = writeQuery(); const queryParams = { entity: 'cTypes',