From 0ff3c993222ad86f6022d95373c9a85cde99b52d Mon Sep 17 00:00:00 2001 From: Raman Shekhawat Date: Wed, 10 Jul 2024 17:29:33 +0530 Subject: [PATCH] fix: consistent naming in top collection query (#1169) * consistent naming in top collection query * fix * without changing --- src/server-extension/resolvers/top_collections.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/server-extension/resolvers/top_collections.ts b/src/server-extension/resolvers/top_collections.ts index 9fef93f2a..8b539f88c 100644 --- a/src/server-extension/resolvers/top_collections.ts +++ b/src/server-extension/resolvers/top_collections.ts @@ -4,7 +4,7 @@ import { Field, ObjectType, Query, Resolver, Arg, registerEnumType, ID, Int } fr import { Json } from '@subsquid/graphql-server' import 'reflect-metadata' import type { EntityManager } from 'typeorm' -import { Collection, CollectionAccount, Listing, ListingSale, ListingStatus, Token } from '../../model' +import { Collection, Listing, ListingSale, ListingStatus, Token } from '../../model' enum Timeframe { HOUR = 'HOUR', @@ -125,6 +125,7 @@ export class TopCollectionResolver { .addSelect('stats AS stats') .addSelect('volume_last_duration AS volume') .addSelect('sales_last_duration AS sales') + .addSelect('verified_at::text AS "verifiedAt"') .addSelect('category AS category') .addSelect( 'CASE WHEN volume_previous_duration != 0 THEN ROUND((volume_last_duration - volume_previous_duration) * 100 / volume_previous_duration, 2) ELSE null END AS volume_change' @@ -141,7 +142,7 @@ export class TopCollectionResolver { .select('collection.id AS collectionId') .addSelect('collection.metadata AS metadata') .addSelect('collection.stats AS stats') - .addSelect('collection.verified_at AS verifiedAt') + .addSelect('collection.verified_at AS verified_at') .addSelect('collection.category AS category') if (timeFrame === Timeframe.ALL) { inBuilder @@ -184,7 +185,6 @@ export class TopCollectionResolver { .innerJoin(Listing, 'listing', 'listing.id = sale.listing') .innerJoin(Token, 'token', 'listing.make_asset_id_id = token.id') .innerJoin(Collection, 'collection', 'token.collection = collection.id') - .leftJoin(ListingStatus, 'status', `listing.id = status.listing AND status.type = 'Finalized'`) .addGroupBy('collection.id')