Skip to content

Commit

Permalink
chore: delete old explicit query texts
Browse files Browse the repository at this point in the history
  • Loading branch information
kilted-andres committed Aug 6, 2024
1 parent 3a66578 commit d54f999
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 45 deletions.
30 changes: 1 addition & 29 deletions src/utilities/indexer/queryCTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
16 changes: 0 additions & 16 deletions src/utilities/indexer/updateAttestationCount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit d54f999

Please sign in to comment.