From 09d2de85c232e6b0498bf2ed58098247cce00cad Mon Sep 17 00:00:00 2001 From: Viki Val Date: Thu, 11 May 2023 13:35:46 +0200 Subject: [PATCH 01/35] :boom: default path is /subsquid/general --- utils/queryPathResolver.ts | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/utils/queryPathResolver.ts b/utils/queryPathResolver.ts index a7e8e34925..302cac33d9 100644 --- a/utils/queryPathResolver.ts +++ b/utils/queryPathResolver.ts @@ -8,16 +8,6 @@ function resolveQueryPath( function getPath(prefix: string) { switch (prefix) { - case 'rmrk': - return '' - case 'bsx': - case 'movr': - case 'glmr': - case 'snek': - case 'subsquid': - case 'ksm': - return 'subsquid/general/' - case 'statemine': case 'westmint': return 'unique/' case 'chain-bsx': @@ -27,20 +17,8 @@ function getPath(prefix: string) { case 'chain-ksm': return 'subsquid/ksm/' default: - return '' + return 'subsquid/general/' } } -// const queryPaths: Record = { -// 'rmrk': { -// subsquid: 'subsquid/general/', -// subquery: '', -// }, -// 'bsx': { -// subsquid: 'subsquid/general/', -// subquery: undefined, -// } - -// } - export default resolveQueryPath From ec9f2239bc02131be006ec16a1f4545f5d2d35bd Mon Sep 17 00:00:00 2001 From: Viki Val Date: Thu, 11 May 2023 13:44:23 +0200 Subject: [PATCH 02/35] :coffin: removed subquery queries/collectionByAccountWithTokens.graphql --- queries/collectionByAccountWithTokens.graphql | 26 ------------------- 1 file changed, 26 deletions(-) delete mode 100644 queries/collectionByAccountWithTokens.graphql diff --git a/queries/collectionByAccountWithTokens.graphql b/queries/collectionByAccountWithTokens.graphql deleted file mode 100644 index 8613af23f4..0000000000 --- a/queries/collectionByAccountWithTokens.graphql +++ /dev/null @@ -1,26 +0,0 @@ -query collectionByAccountWithTokens($account: String!) { - collectionEntities( - filter: { currentOwner: { equalTo: $account } } - orderBy: BLOCK_NUMBER_DESC - ) { - nodes { - id - name - max - metadata - symbol - nfts( - filter: { - currentOwner: { equalTo: $account } - burned: { distinctFrom: true } - } - ) { - totalCount - nodes { - id - price - } - } - } - } -} From a2286b4fb0ed81a3988999c8cf9ae02b44667832 Mon Sep 17 00:00:00 2001 From: Viki Val Date: Thu, 11 May 2023 13:44:23 +0200 Subject: [PATCH 03/35] :coffin: removed subquery queries/collectionById.graphql --- queries/collectionById.graphql | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 queries/collectionById.graphql diff --git a/queries/collectionById.graphql b/queries/collectionById.graphql deleted file mode 100644 index 567bc70375..0000000000 --- a/queries/collectionById.graphql +++ /dev/null @@ -1,33 +0,0 @@ -#import "./fragments/collection.graphql" -#import "./fragments/collectionDetails.graphql" -#import "./fragments/nft.graphql" -#import "./fragments/nftDetails.graphql" - -query collectionById( - $id: String! - $search: [NFTEntityFilter!] - $orderBy: NftEntitiesOrderBy = BLOCK_NUMBER_DESC - $first: Int! - $offset: Int -) { - collectionEntity(id: $id) { - ...collection - ...collectionDetails - createdAt - nfts( - orderBy: [$orderBy, BLOCK_NUMBER_DESC] - first: $first - offset: $offset - filter: { burned: { distinctFrom: true }, and: $search } - ) { - totalCount - nodes { - ...nft - ...nftDetails - emotes { - totalCount - } - } - } - } -} From 463a2e0cb1a23fd871c173a9bdeb4a733d1180b7 Mon Sep 17 00:00:00 2001 From: Viki Val Date: Thu, 11 May 2023 13:44:24 +0200 Subject: [PATCH 04/35] :coffin: removed subquery queries/collectionForMint.graphql --- queries/collectionForMint.graphql | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 queries/collectionForMint.graphql diff --git a/queries/collectionForMint.graphql b/queries/collectionForMint.graphql deleted file mode 100644 index af2bae6a06..0000000000 --- a/queries/collectionForMint.graphql +++ /dev/null @@ -1,21 +0,0 @@ -query collectionForMint($account: String!) { - collectionEntities( - filter: { currentOwner: { equalTo: $account } } - orderBy: BLOCK_NUMBER_DESC - ) { - nodes { - id - name - max - metadata - symbol - nfts { - totalCount - nodes { - id - burned - } - } - } - } -} From 6d52d43da00d1912ad8ee51309180aa44bb31ca8 Mon Sep 17 00:00:00 2001 From: Viki Val Date: Thu, 11 May 2023 13:44:24 +0200 Subject: [PATCH 05/35] :coffin: removed subquery queries/collectionIssuerList.graphql --- queries/collectionIssuerList.graphql | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 queries/collectionIssuerList.graphql diff --git a/queries/collectionIssuerList.graphql b/queries/collectionIssuerList.graphql deleted file mode 100644 index b7c030734e..0000000000 --- a/queries/collectionIssuerList.graphql +++ /dev/null @@ -1,17 +0,0 @@ -query collectionIssuerList($denyList: [String!]) { - collectionEntities(filter: { issuer: { notIn: $denyList } }) { - nodes { - issuer - nfts(filter: { burned: { distinctFrom: true } }) { - totalCount - nodes { - issuer - currentOwner - metadata - price - events - } - } - } - } -} From 2b73e84753a73f180574b5555383758a7915f6fa Mon Sep 17 00:00:00 2001 From: Viki Val Date: Thu, 11 May 2023 13:44:24 +0200 Subject: [PATCH 06/35] :coffin: removed subquery queries/collectionListByAccount.graphql --- queries/collectionListByAccount.graphql | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 queries/collectionListByAccount.graphql diff --git a/queries/collectionListByAccount.graphql b/queries/collectionListByAccount.graphql deleted file mode 100644 index 83a569a7ab..0000000000 --- a/queries/collectionListByAccount.graphql +++ /dev/null @@ -1,17 +0,0 @@ -#import "./fragments/collection.graphql" -#import "./fragments/collectionDetails.graphql" - -query collectionListByAccount($account: String!, $first: Int!, $offset: Int) { - collectionEntities( - filter: { issuer: { equalTo: $account }, id: { notLike: "%KAN" } } - orderBy: BLOCK_NUMBER_DESC - first: $first - offset: $offset - ) { - totalCount - nodes { - ...collection - ...collectionDetails - } - } -} From 4e062dc1ba32668b77f62cbd5e6c16c44fd3698a Mon Sep 17 00:00:00 2001 From: Viki Val Date: Thu, 11 May 2023 13:44:24 +0200 Subject: [PATCH 07/35] :coffin: removed subquery queries/collectionListWithSearch.graphql --- queries/collectionListWithSearch.graphql | 33 ------------------------ 1 file changed, 33 deletions(-) delete mode 100644 queries/collectionListWithSearch.graphql diff --git a/queries/collectionListWithSearch.graphql b/queries/collectionListWithSearch.graphql deleted file mode 100644 index 252520de52..0000000000 --- a/queries/collectionListWithSearch.graphql +++ /dev/null @@ -1,33 +0,0 @@ -#import "./fragments/collection.graphql" -#import "./fragments/collectionDetails.graphql" - -query collectionListWithSearch( - $first: Int! - $offset: Int - $search: [CollectionEntityFilter!] - $listed: [NFTEntityFilter!] - $orderBy: [CollectionEntitiesOrderBy!] = [BLOCK_NUMBER_DESC] -) { - collectionEntities( - orderBy: $orderBy - first: $first - offset: $offset - filter: { id: { notLike: "%KAN%" }, and: $search } - ) { - totalCount - nodes { - ...collection - ...collectionDetails - nfts(filter: { burned: { distinctFrom: true }, and: $listed }) { - nodes { - id - metadata - name - price - burned - currentOwner - } - } - } - } -} From 0bbb1443dcc11b90f757b5c19e1abaec2c2e0ba1 Mon Sep 17 00:00:00 2001 From: Viki Val Date: Thu, 11 May 2023 13:44:25 +0200 Subject: [PATCH 08/35] :coffin: removed subquery queries/collectionNftEventListById.graphql --- queries/collectionNftEventListById.graphql | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 queries/collectionNftEventListById.graphql diff --git a/queries/collectionNftEventListById.graphql b/queries/collectionNftEventListById.graphql deleted file mode 100644 index 1f6b475f4f..0000000000 --- a/queries/collectionNftEventListById.graphql +++ /dev/null @@ -1,10 +0,0 @@ -query collectionNftEventListById($id: String!) { - collection: collectionEntity(id: $id) { - id - nfts(filter: { burned: { distinctFrom: true }}) { - nodes { - events - } - } - } -} From 591740c617be183b96ffef1a4d45f975333bc6ee Mon Sep 17 00:00:00 2001 From: Viki Val Date: Thu, 11 May 2023 13:44:25 +0200 Subject: [PATCH 09/35] :coffin: removed subquery queries/collectionSeriesList.graphql --- queries/collectionSeriesList.graphql | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 queries/collectionSeriesList.graphql diff --git a/queries/collectionSeriesList.graphql b/queries/collectionSeriesList.graphql deleted file mode 100644 index 9c1100a1a5..0000000000 --- a/queries/collectionSeriesList.graphql +++ /dev/null @@ -1,22 +0,0 @@ -#import "./fragments/collection.graphql" -#import "./fragments/collectionDetails.graphql" - -query collectionSeriesList($denyList: [String!]) { - collectionEntities(filter: { issuer: { notIn: $denyList } }) { - nodes { - issuer - nfts(filter: { burned: { distinctFrom: true } }) { - totalCount - nodes { - issuer - currentOwner - metadata - price - events - } - } - ...collection - ...collectionDetails - } - } -} From 3e23dfb40b28d433900061f279398a379e39835b Mon Sep 17 00:00:00 2001 From: Viki Val Date: Thu, 11 May 2023 13:44:25 +0200 Subject: [PATCH 10/35] :coffin: removed subquery queries/collectionStatsById.graphql --- queries/collectionStatsById.graphql | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 queries/collectionStatsById.graphql diff --git a/queries/collectionStatsById.graphql b/queries/collectionStatsById.graphql deleted file mode 100644 index 51b73d5cfb..0000000000 --- a/queries/collectionStatsById.graphql +++ /dev/null @@ -1,26 +0,0 @@ -query collectionStatsById($id: String!) { - stats: collectionEntity(id: $id) { - id - base: nfts { - count: totalCount - nfts: nodes { - currentOwner - events - } - aggregates { - distinctCount { - currentOwner - } - } - } - listed: nfts(filter: { price: { greaterThan: "0" } }) { - count: totalCount - aggregates { - floor: min { - value: price - } - } - } - - } -} From bd167cff4b1dddf66b8a828c38de7d82290bdfc4 Mon Sep 17 00:00:00 2001 From: Viki Val Date: Thu, 11 May 2023 13:44:25 +0200 Subject: [PATCH 11/35] :coffin: removed subquery queries/firstNftByIssuer.graphql --- queries/firstNftByIssuer.graphql | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 queries/firstNftByIssuer.graphql diff --git a/queries/firstNftByIssuer.graphql b/queries/firstNftByIssuer.graphql deleted file mode 100644 index 8befbc6587..0000000000 --- a/queries/firstNftByIssuer.graphql +++ /dev/null @@ -1,15 +0,0 @@ -query firstNftByIssuer($account: String!) { - nFTEntities( - filter: { - issuer: { equalTo: $account } - name: { notLike: "%Kanaria%" } - burned: { distinctFrom: true } - } - orderBy: BLOCK_NUMBER_DESC - first: 1 - ) { - nodes { - metadata - } - } -} From 24263d092c93877728d6ac3f4cfac1f9a0395a43 Mon Sep 17 00:00:00 2001 From: Viki Val Date: Thu, 11 May 2023 13:44:25 +0200 Subject: [PATCH 12/35] :coffin: removed subquery queries/mintedCollectionListByAccount.graphql --- queries/mintedCollectionListByAccount.graphql | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 queries/mintedCollectionListByAccount.graphql diff --git a/queries/mintedCollectionListByAccount.graphql b/queries/mintedCollectionListByAccount.graphql deleted file mode 100644 index 404b35c8b6..0000000000 --- a/queries/mintedCollectionListByAccount.graphql +++ /dev/null @@ -1,13 +0,0 @@ -query mintedCollectionListByAccount($account: String!) { - collectionEntities( - filter: { issuer: { equalTo: $account } } - orderBy: NAME_ASC - ) { - totalCount - nodes { - id - name - symbol - } - } -} From 50e42cf2870bf7cd39b3e5c1a94546ffc5292236 Mon Sep 17 00:00:00 2001 From: Viki Val Date: Thu, 11 May 2023 13:44:26 +0200 Subject: [PATCH 13/35] :coffin: removed subquery queries/nftById.graphql --- queries/nftById.graphql | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 queries/nftById.graphql diff --git a/queries/nftById.graphql b/queries/nftById.graphql deleted file mode 100644 index d54f208d03..0000000000 --- a/queries/nftById.graphql +++ /dev/null @@ -1,20 +0,0 @@ -#import "./fragments/nft.graphql" -#import "./fragments/nftDetails.graphql" - -query nftById($id: String!) { - nFTEntity(id: $id) { - ...nft - ...nftDetails - collection { - id - name - } - emotes { - nodes { - caller - value - } - } - events - } -} From db774057237a25cd91035d92b2c1f49ded4ea144 Mon Sep 17 00:00:00 2001 From: Viki Val Date: Thu, 11 May 2023 13:44:26 +0200 Subject: [PATCH 14/35] :coffin: removed subquery queries/nftByIdMinimal.graphql --- queries/nftByIdMinimal.graphql | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 queries/nftByIdMinimal.graphql diff --git a/queries/nftByIdMinimal.graphql b/queries/nftByIdMinimal.graphql deleted file mode 100644 index 8a2c189b4c..0000000000 --- a/queries/nftByIdMinimal.graphql +++ /dev/null @@ -1,8 +0,0 @@ -query nftByIdMinimal($id: String!) { - nft: nFTEntity(id: $id) { - id - currentOwner - price - events - } -} From 8c580cbbf7674a220f95f28b793d333554c7048a Mon Sep 17 00:00:00 2001 From: Viki Val Date: Thu, 11 May 2023 13:44:26 +0200 Subject: [PATCH 15/35] :coffin: removed subquery queries/nftIdListByCollection.graphql --- queries/nftIdListByCollection.graphql | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 queries/nftIdListByCollection.graphql diff --git a/queries/nftIdListByCollection.graphql b/queries/nftIdListByCollection.graphql deleted file mode 100644 index 123e1923fc..0000000000 --- a/queries/nftIdListByCollection.graphql +++ /dev/null @@ -1,9 +0,0 @@ -query nftListByCollection($id: String!) { - nftEntities: nFTEntities( - filter: { collectionId: { equalTo: $id }, burned: { distinctFrom: true } } - ) { - nodes { - id - } - } -} From 23bea58b523bad51ef5fa1997cbccdcaa43c545c Mon Sep 17 00:00:00 2001 From: Viki Val Date: Thu, 11 May 2023 13:44:26 +0200 Subject: [PATCH 16/35] :coffin: removed subquery queries/nftList.graphql --- queries/nftList.graphql | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 queries/nftList.graphql diff --git a/queries/nftList.graphql b/queries/nftList.graphql deleted file mode 100644 index d87ba656fc..0000000000 --- a/queries/nftList.graphql +++ /dev/null @@ -1,20 +0,0 @@ -#import "./fragments/nft.graphql" -#import "./fragments/nftDetails.graphql" - -query nfts($first: Int!, $offset: Int) { - nFTEntities( - orderBy: BLOCK_NUMBER_DESC - first: $first - offset: $offset - filter: { name: { notLike: "%Kanaria%" } } - ) { - totalCount - nodes { - ...nft - ...nftDetails - emotes { - totalCount - } - } - } -} From 9d1eec85f1d9937d7bab5bb311fb0d1fb36c374d Mon Sep 17 00:00:00 2001 From: Viki Val Date: Thu, 11 May 2023 13:44:26 +0200 Subject: [PATCH 17/35] :coffin: removed subquery queries/nftListByAccount.graphql --- queries/nftListByAccount.graphql | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 queries/nftListByAccount.graphql diff --git a/queries/nftListByAccount.graphql b/queries/nftListByAccount.graphql deleted file mode 100644 index 0febeae67c..0000000000 --- a/queries/nftListByAccount.graphql +++ /dev/null @@ -1,20 +0,0 @@ -#import "./fragments/nft.graphql" -#import "./fragments/nftDetails.graphql" - -query nftListByAccount($account: String!, $first: Int!, $offset: Int) { - nFTEntities( - filter: { - currentOwner: { equalTo: $account } - name: { notLike: "%Kanaria%" } - } - orderBy: BLOCK_NUMBER_DESC - first: $first - offset: $offset - ) { - totalCount - nodes { - ...nft - ...nftDetails - } - } -} From e426cafa4cc5183a6fb719cb7d096b2e44af501e Mon Sep 17 00:00:00 2001 From: Viki Val Date: Thu, 11 May 2023 13:44:27 +0200 Subject: [PATCH 18/35] :coffin: removed subquery queries/nftListByCollection.graphql --- queries/nftListByCollection.graphql | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 queries/nftListByCollection.graphql diff --git a/queries/nftListByCollection.graphql b/queries/nftListByCollection.graphql deleted file mode 100644 index 291ec2197f..0000000000 --- a/queries/nftListByCollection.graphql +++ /dev/null @@ -1,13 +0,0 @@ -query nftListByCollection($id: String!) { - nFTEntities( - filter: { collectionId: { equalTo: $id }, burned: { distinctFrom: true } } - ) { - nodes { - id - currentOwner - issuer - price - events - } - } -} From fb3296a578f55976fc82e8a68198701c1a7a486e Mon Sep 17 00:00:00 2001 From: Viki Val Date: Thu, 11 May 2023 13:44:27 +0200 Subject: [PATCH 19/35] :coffin: removed subquery queries/nftListByIssuer.graphql --- queries/nftListByIssuer.graphql | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 queries/nftListByIssuer.graphql diff --git a/queries/nftListByIssuer.graphql b/queries/nftListByIssuer.graphql deleted file mode 100644 index 605a48caaa..0000000000 --- a/queries/nftListByIssuer.graphql +++ /dev/null @@ -1,31 +0,0 @@ -#import "./fragments/nft.graphql" -#import "./fragments/nftDetails.graphql" - -query nftListByIssuer( - $account: String! - $first: Int! - $offset: Int - $search: [NFTEntityFilter!] - $orderBy: NftEntitiesOrderBy = BLOCK_NUMBER_DESC -) { - nFTEntities( - filter: { - issuer: { equalTo: $account } - name: { notLike: "%Kanaria%" } - burned: { distinctFrom: true } - and: $search - } - orderBy: [$orderBy, BLOCK_NUMBER_DESC] - first: $first - offset: $offset - ) { - totalCount - nodes { - ...nft - ...nftDetails - emotes { - totalCount - } - } - } -} From 00f3ed49d17fb7136bc42ef6c7972ee240483aa8 Mon Sep 17 00:00:00 2001 From: Viki Val Date: Thu, 11 May 2023 13:44:27 +0200 Subject: [PATCH 20/35] :coffin: removed subquery queries/nftListByIssuerAndOwner.graphql --- queries/nftListByIssuerAndOwner.graphql | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 queries/nftListByIssuerAndOwner.graphql diff --git a/queries/nftListByIssuerAndOwner.graphql b/queries/nftListByIssuerAndOwner.graphql deleted file mode 100644 index f1d6735040..0000000000 --- a/queries/nftListByIssuerAndOwner.graphql +++ /dev/null @@ -1,15 +0,0 @@ -query nftListByIssuerAndOwner( - $account: String! - $currentOwner: String! -) { - nftList: nFTEntities( - filter: { - issuer: { equalTo: $account } - currentOwner: { equalTo: $currentOwner } - name: { notLike: "%Kanaria%" } - burned: { distinctFrom: true } - } - ) { - totalCount - } -} From 87e26b62cc2858128a4eb28316ce9a12400c954c Mon Sep 17 00:00:00 2001 From: Viki Val Date: Thu, 11 May 2023 13:44:27 +0200 Subject: [PATCH 21/35] :coffin: removed subquery queries/nftListCollected.graphql --- queries/nftListCollected.graphql | 33 -------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 queries/nftListCollected.graphql diff --git a/queries/nftListCollected.graphql b/queries/nftListCollected.graphql deleted file mode 100644 index 82fcf651ae..0000000000 --- a/queries/nftListCollected.graphql +++ /dev/null @@ -1,33 +0,0 @@ -#import "./fragments/nft.graphql" -#import "./fragments/nftDetails.graphql" - -query nftListCollected( - $account: String! - $first: Int! - $offset: Int - $orderBy: NftEntitiesOrderBy = BLOCK_NUMBER_DESC - $search: [NFTEntityFilter!] -) { - nFTEntities( - filter: { - issuer: { notEqualTo: $account } - currentOwner: { equalTo: $account } - name: { notLike: "%Kanaria%" } - burned: { distinctFrom: true } - and: $search - } - orderBy: [$orderBy, BLOCK_NUMBER_DESC] - first: $first - offset: $offset - ) { - totalCount - nodes { - ...nft - ...nftDetails - emotes { - totalCount - } - createdAt - } - } -} From a2c0835ec6033c559c64a5a659abd85161561701 Mon Sep 17 00:00:00 2001 From: Viki Val Date: Thu, 11 May 2023 13:44:27 +0200 Subject: [PATCH 22/35] :coffin: removed subquery queries/nftListSold.graphql --- queries/nftListSold.graphql | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 queries/nftListSold.graphql diff --git a/queries/nftListSold.graphql b/queries/nftListSold.graphql deleted file mode 100644 index e3aeb5f9f5..0000000000 --- a/queries/nftListSold.graphql +++ /dev/null @@ -1,32 +0,0 @@ -#import "./fragments/nft.graphql" -#import "./fragments/nftDetails.graphql" - -query nftListSold( - $account: String! - $first: Int! - $offset: Int - $orderBy: NftEntitiesOrderBy = BLOCK_NUMBER_DESC - $search: [NFTEntityFilter!] -) { - nFTEntities( - filter: { - issuer: { equalTo: $account } - currentOwner: { notEqualTo: $account } - name: { notLike: "%Kanaria%" } - burned: { distinctFrom: true } - and: $search - } - orderBy: [$orderBy, BLOCK_NUMBER_DESC] - first: $first - offset: $offset - ) { - totalCount - nodes { - ...nft - ...nftDetails - emotes { - totalCount - } - } - } -} From 727cc27b008c73205ac11b1935bf754b20778ec9 Mon Sep 17 00:00:00 2001 From: Viki Val Date: Thu, 11 May 2023 13:44:28 +0200 Subject: [PATCH 23/35] :coffin: removed subquery queries/nftListWithSearch.graphql --- queries/nftListWithSearch.graphql | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 queries/nftListWithSearch.graphql diff --git a/queries/nftListWithSearch.graphql b/queries/nftListWithSearch.graphql deleted file mode 100644 index 93cf0b5b5a..0000000000 --- a/queries/nftListWithSearch.graphql +++ /dev/null @@ -1,31 +0,0 @@ -#import "./fragments/nft.graphql" -#import "./fragments/nftDetails.graphql" - -query nftListWithSearch( - $first: Int! - $offset: Int - $denyList: [String!] - $search: [NFTEntityFilter!] - $orderBy: [NftEntitiesOrderBy!] = [BLOCK_NUMBER_DESC] -) { - nFTEntities( - orderBy: $orderBy - first: $first - offset: $offset - filter: { - burned: { distinctFrom: true } - name: { notLike: "%Kanaria%" } - issuer: { notIn: $denyList } - and: $search - } - ) { - totalCount - nodes { - ...nft - ...nftDetails - emotes { - totalCount - } - } - } -} From 1df3c17a7f4fc725b344e5a065ded31ebefc9690 Mon Sep 17 00:00:00 2001 From: Viki Val Date: Thu, 11 May 2023 13:44:28 +0200 Subject: [PATCH 24/35] :coffin: removed subquery queries/nftMetaList.graphql --- queries/nftMetaList.graphql | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 queries/nftMetaList.graphql diff --git a/queries/nftMetaList.graphql b/queries/nftMetaList.graphql deleted file mode 100644 index 87d7876e65..0000000000 --- a/queries/nftMetaList.graphql +++ /dev/null @@ -1,13 +0,0 @@ -query nftMetaList($first: Int!, $offset: Int) { - nFTEntities( - orderBy: BLOCK_NUMBER_DESC - first: $first - offset: $offset - filter: { name: { notLike: "%Kanaria%" } } - ) { - totalCount - nodes { - metadata - } - } -} From 7d5e32688b8bcb4c7a083a672e1aea08a816d7e7 Mon Sep 17 00:00:00 2001 From: Viki Val Date: Thu, 11 May 2023 13:44:28 +0200 Subject: [PATCH 25/35] :coffin: removed subquery queries/nftMetaListWithSearch.graphql --- queries/nftMetaListWithSearch.graphql | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 queries/nftMetaListWithSearch.graphql diff --git a/queries/nftMetaListWithSearch.graphql b/queries/nftMetaListWithSearch.graphql deleted file mode 100644 index 866f77c900..0000000000 --- a/queries/nftMetaListWithSearch.graphql +++ /dev/null @@ -1,17 +0,0 @@ -query nftMetaListWithSearch( - $first: Int! - $offset: Int - $search: [NFTEntityFilter!] -) { - nFTEntities( - orderBy: BLOCK_NUMBER_DESC - first: $first - offset: $offset - filter: { name: { notLike: "%Kanaria%" }, and: $search } - ) { - totalCount - nodes { - metadata - } - } -} From 883d152ae1c8512948d0ad6918bb6fe7dc5b7901 Mon Sep 17 00:00:00 2001 From: Viki Val Date: Thu, 11 May 2023 13:44:28 +0200 Subject: [PATCH 26/35] :coffin: removed subquery queries/nftSimpleListByAccount.graphql --- queries/nftSimpleListByAccount.graphql | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 queries/nftSimpleListByAccount.graphql diff --git a/queries/nftSimpleListByAccount.graphql b/queries/nftSimpleListByAccount.graphql deleted file mode 100644 index d04740d241..0000000000 --- a/queries/nftSimpleListByAccount.graphql +++ /dev/null @@ -1,16 +0,0 @@ -#import "./fragments/nft.graphql" -#import "./fragments/nftDetails.graphql" - -query nftSimpleListByAccount($account: String!, $first: Int!) { - nFTEntities( - filter: { issuer: { equalTo: $account }, name: { notLike: "%Kanaria%" } } - orderBy: BLOCK_NUMBER_DESC - first: $first - ) { - totalCount - nodes { - ...nft - ...nftDetails - } - } -} From 6f98b290390b66c0c7f610ab55e78cfb5dea652d Mon Sep 17 00:00:00 2001 From: Viki Val Date: Thu, 11 May 2023 13:44:29 +0200 Subject: [PATCH 27/35] :coffin: removed subquery queries/nftStatsByIssuer.graphql --- queries/nftStatsByIssuer.graphql | 56 -------------------------------- 1 file changed, 56 deletions(-) delete mode 100644 queries/nftStatsByIssuer.graphql diff --git a/queries/nftStatsByIssuer.graphql b/queries/nftStatsByIssuer.graphql deleted file mode 100644 index 9898e0a0f7..0000000000 --- a/queries/nftStatsByIssuer.graphql +++ /dev/null @@ -1,56 +0,0 @@ -query nFTStatsByIssuer($account: String!) { - firstMint: nFTEntities( - filter: { - issuer: { equalTo: $account } - name: { notLike: "%Kanaria%" } - burned: { distinctFrom: true } - } - orderBy: BLOCK_NUMBER_ASC - first: 1 - ) { - nodes { - collection { - createdAt - } - } - } - - nFTCreated: nFTEntities( - filter: { - issuer: { equalTo: $account } - name: { notLike: "%Kanaria%" } - burned: { distinctFrom: true } - } - ) { - totalCount - } - - nFTCollected: nFTEntities( - filter: { - issuer: { notEqualTo: $account } - currentOwner: { equalTo: $account } - name: { notLike: "%Kanaria%" } - burned: { distinctFrom: true } - } - orderBy: BLOCK_NUMBER_DESC - first: 1 - ) { - nodes { - collection { - createdAt - } - } - totalCount - } - - nFTSold: nFTEntities( - filter: { - issuer: { equalTo: $account } - currentOwner: { notEqualTo: $account } - name: { notLike: "%Kanaria%" } - burned: { distinctFrom: true } - } - ) { - totalCount - } -} From c903c31029c53b9470e24ef3aff47f4f5fe2fc74 Mon Sep 17 00:00:00 2001 From: Viki Val Date: Thu, 11 May 2023 13:44:29 +0200 Subject: [PATCH 28/35] :coffin: removed subquery queries/simpleNft.graphql --- queries/simpleNft.graphql | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 queries/simpleNft.graphql diff --git a/queries/simpleNft.graphql b/queries/simpleNft.graphql deleted file mode 100644 index f968f50d87..0000000000 --- a/queries/simpleNft.graphql +++ /dev/null @@ -1,6 +0,0 @@ -fragment simpleNft on NFTEntity { - id - name - metadata - burned -} From cf53bc55d8aca3358dce714b992e315662da2f27 Mon Sep 17 00:00:00 2001 From: Viki Val Date: Thu, 11 May 2023 13:44:29 +0200 Subject: [PATCH 29/35] :coffin: removed subquery queries/unique/collectionCuratedList.graphql --- queries/unique/collectionCuratedList.graphql | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 queries/unique/collectionCuratedList.graphql diff --git a/queries/unique/collectionCuratedList.graphql b/queries/unique/collectionCuratedList.graphql deleted file mode 100644 index 9b636b3623..0000000000 --- a/queries/unique/collectionCuratedList.graphql +++ /dev/null @@ -1,9 +0,0 @@ -#import "../fragments/collection.graphql" - -query collectionCuratedList { - collectionEntities(orderBy: BLOCK_NUMBER_DESC, first: 5) { - nodes { - ...collection - } - } -} From 367dcc6aa52093d7b80bd7f250afac2f109acfb6 Mon Sep 17 00:00:00 2001 From: Viki Val Date: Thu, 11 May 2023 13:44:29 +0200 Subject: [PATCH 30/35] :coffin: removed subquery queries/userStatsByAccount.graphql --- queries/userStatsByAccount.graphql | 40 ------------------------------ 1 file changed, 40 deletions(-) delete mode 100644 queries/userStatsByAccount.graphql diff --git a/queries/userStatsByAccount.graphql b/queries/userStatsByAccount.graphql deleted file mode 100644 index 1e2e7cb840..0000000000 --- a/queries/userStatsByAccount.graphql +++ /dev/null @@ -1,40 +0,0 @@ -query userStatsByAccount($account: String!) { - firstMint: collectionEntities( - filter: { issuer: { equalTo: $account } } - orderBy: CREATED_AT_ASC - first: 1 - ) { - nodes { - id - createdAt - } - } - - created: nFTEntities( - filter: { issuer: { equalTo: $account }, burned: { distinctFrom: true } } - ) { - totalCount - } - - collected: nFTEntities( - filter: { - issuer: { notEqualTo: $account } - currentOwner: { equalTo: $account } - burned: { distinctFrom: true } - } - orderBy: BLOCK_NUMBER_DESC - first: 1 - ) { - totalCount - } - - sold: nFTEntities( - filter: { - issuer: { equalTo: $account } - currentOwner: { notEqualTo: $account } - burned: { distinctFrom: true } - } - ) { - totalCount - } -} From 0fb2352d8d19b5921867f507e9f0989fe87f20bf Mon Sep 17 00:00:00 2001 From: Viki Val Date: Thu, 11 May 2023 13:46:59 +0200 Subject: [PATCH 31/35] :technologist: no more hacking of prefix --- utils/uniquery.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/uniquery.ts b/utils/uniquery.ts index d1f48e2dd1..2c3d03e633 100644 --- a/utils/uniquery.ts +++ b/utils/uniquery.ts @@ -34,7 +34,7 @@ export function unwrapId( } export function correctPrefix(prefix: string): string { - return prefix === 'rmrk' ? 'subsquid' : prefix + return prefix } export function ifRMRK(prefix: string, first: T, second: T): T { From cfdc787be6469743fe02af601f2c15bb599d6837 Mon Sep 17 00:00:00 2001 From: Viki Val Date: Thu, 11 May 2023 13:48:10 +0200 Subject: [PATCH 32/35] :coffin: removed obsolete function --- utils/prefix.ts | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/utils/prefix.ts b/utils/prefix.ts index 3f4cb98864..b528da046e 100644 --- a/utils/prefix.ts +++ b/utils/prefix.ts @@ -20,20 +20,6 @@ export function isRemark(prefix: string): boolean { return prefix === 'rmrk' } -export function getSupportedClient(prefix: string): 'subquery' | 'subsquid' { - switch (prefix) { - case 'statemine': - case 'westmint': - case 'rmrk': - return 'subquery' - case 'bsx': - case 'snek': - return 'subsquid' - default: - return 'subsquid' - } -} - export function prefixBuildOnText(prefix: string): string { switch (prefix) { case 'bsx': From a972cb33804550343157c4655966236bdd77e296 Mon Sep 17 00:00:00 2001 From: Viki Val Date: Thu, 11 May 2023 13:50:04 +0200 Subject: [PATCH 33/35] :technologist: no more hacking of prefix --- composables/usePrefix.ts | 2 +- utils/mixins/prefixMixin.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/composables/usePrefix.ts b/composables/usePrefix.ts index fdc6ac2371..1886b88fe3 100644 --- a/composables/usePrefix.ts +++ b/composables/usePrefix.ts @@ -28,7 +28,7 @@ export default function () { } const client = computed(() => { - return urlPrefix.value === 'rmrk' ? 'subsquid' : urlPrefix.value + return urlPrefix.value }) const tokenId = computed(() => getKusamaAssetId(urlPrefix.value)) diff --git a/utils/mixins/prefixMixin.ts b/utils/mixins/prefixMixin.ts index 31a152d89b..176e970c20 100644 --- a/utils/mixins/prefixMixin.ts +++ b/utils/mixins/prefixMixin.ts @@ -13,7 +13,7 @@ export default class PrefixMixin extends Vue { } get client(): string { - return this.urlPrefix === 'rmrk' ? 'subsquid' : this.urlPrefix + return this.urlPrefix } get isMoonriver(): boolean { From d82dd92a8002d8d0e7a7579cd8c939e4cd8eeb39 Mon Sep 17 00:00:00 2001 From: Viki Val Date: Thu, 11 May 2023 14:29:13 +0200 Subject: [PATCH 34/35] :squid: rewrote queries into SubSquid --- queries/collectionByAccountWithTokens.graphql | 17 +++++++++++++++++ queries/nftSimpleListByAccount.graphql | 13 +++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 queries/collectionByAccountWithTokens.graphql create mode 100644 queries/nftSimpleListByAccount.graphql diff --git a/queries/collectionByAccountWithTokens.graphql b/queries/collectionByAccountWithTokens.graphql new file mode 100644 index 0000000000..38078247d2 --- /dev/null +++ b/queries/collectionByAccountWithTokens.graphql @@ -0,0 +1,17 @@ +query collectionByAccountWithTokens($account: String!) { + collectionEntities(where: {currentOwner_eq: $account supply_gt: 0}, orderBy: blockNumber_DESC) { + id + name + max + metadata + symbol + nftCount + available: supply + nfts(where: {currentOwner_eq: $account, burned_eq: false}) { + id + price + burned + } + } +} + diff --git a/queries/nftSimpleListByAccount.graphql b/queries/nftSimpleListByAccount.graphql new file mode 100644 index 0000000000..14b97b7625 --- /dev/null +++ b/queries/nftSimpleListByAccount.graphql @@ -0,0 +1,13 @@ +#import "./fragments/nft.graphql" +#import "./fragments/nftDetails.graphql" + +query nftSimpleListByAccount($account: String!, $first: Int!) { + nftEntities( + where: { issuer_eq: $account, name_not_contains: "kanaria" } + orderBy: blockNumber_DESC + limit: $first + ) { + ...nft + ...nftDetails + } +} From 43aa8214393bb37353efaa6757e24883b63842a2 Mon Sep 17 00:00:00 2001 From: Viki Val Date: Thu, 11 May 2023 14:29:56 +0200 Subject: [PATCH 35/35] :ambulance: unable to build --- components/rmrk/Create/Admin/AdminPanel.vue | 8 +------- components/spotlight/SpotlightDetail.vue | 6 +++--- components/unique/Gallery/Item/AvailableActions.vue | 2 +- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/components/rmrk/Create/Admin/AdminPanel.vue b/components/rmrk/Create/Admin/AdminPanel.vue index 440eece548..e90339ca40 100644 --- a/components/rmrk/Create/Admin/AdminPanel.vue +++ b/components/rmrk/Create/Admin/AdminPanel.vue @@ -138,13 +138,7 @@ export default class AdminPanel extends mixins( data: { collectionEntities }, } = collections - this.collections = collectionEntities.nodes - ?.map((ce: any) => ({ - ...ce, - available: ce.nfts?.totalCount, - nfts: ce.nfts?.nodes?.map((n: AdminNFT) => n), - })) - .filter((ce: MintedCollection) => ce.available > 0) + this.collections = collectionEntities } @Watch('accountId', { immediate: true }) diff --git a/components/spotlight/SpotlightDetail.vue b/components/spotlight/SpotlightDetail.vue index d653e68a5f..4a2c883a1b 100644 --- a/components/spotlight/SpotlightDetail.vue +++ b/components/spotlight/SpotlightDetail.vue @@ -7,7 +7,7 @@