Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

💥 default query paths simplified #5920

Merged
merged 35 commits into from
May 11, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
09d2de8
:boom: default path is /subsquid/general
vikiival May 11, 2023
ec9f223
:coffin: removed subquery queries/collectionByAccountWithTokens.graphql
vikiival May 11, 2023
a2286b4
:coffin: removed subquery queries/collectionById.graphql
vikiival May 11, 2023
463a2e0
:coffin: removed subquery queries/collectionForMint.graphql
vikiival May 11, 2023
6d52d43
:coffin: removed subquery queries/collectionIssuerList.graphql
vikiival May 11, 2023
2b73e84
:coffin: removed subquery queries/collectionListByAccount.graphql
vikiival May 11, 2023
4e062dc
:coffin: removed subquery queries/collectionListWithSearch.graphql
vikiival May 11, 2023
0bbb144
:coffin: removed subquery queries/collectionNftEventListById.graphql
vikiival May 11, 2023
591740c
:coffin: removed subquery queries/collectionSeriesList.graphql
vikiival May 11, 2023
3e23dfb
:coffin: removed subquery queries/collectionStatsById.graphql
vikiival May 11, 2023
bd167cf
:coffin: removed subquery queries/firstNftByIssuer.graphql
vikiival May 11, 2023
24263d0
:coffin: removed subquery queries/mintedCollectionListByAccount.graphql
vikiival May 11, 2023
50e42cf
:coffin: removed subquery queries/nftById.graphql
vikiival May 11, 2023
db77405
:coffin: removed subquery queries/nftByIdMinimal.graphql
vikiival May 11, 2023
8c580cb
:coffin: removed subquery queries/nftIdListByCollection.graphql
vikiival May 11, 2023
23bea58
:coffin: removed subquery queries/nftList.graphql
vikiival May 11, 2023
9d1eec8
:coffin: removed subquery queries/nftListByAccount.graphql
vikiival May 11, 2023
e426caf
:coffin: removed subquery queries/nftListByCollection.graphql
vikiival May 11, 2023
fb3296a
:coffin: removed subquery queries/nftListByIssuer.graphql
vikiival May 11, 2023
00f3ed4
:coffin: removed subquery queries/nftListByIssuerAndOwner.graphql
vikiival May 11, 2023
87e26b6
:coffin: removed subquery queries/nftListCollected.graphql
vikiival May 11, 2023
a2c0835
:coffin: removed subquery queries/nftListSold.graphql
vikiival May 11, 2023
727cc27
:coffin: removed subquery queries/nftListWithSearch.graphql
vikiival May 11, 2023
1df3c17
:coffin: removed subquery queries/nftMetaList.graphql
vikiival May 11, 2023
7d5e326
:coffin: removed subquery queries/nftMetaListWithSearch.graphql
vikiival May 11, 2023
883d152
:coffin: removed subquery queries/nftSimpleListByAccount.graphql
vikiival May 11, 2023
6f98b29
:coffin: removed subquery queries/nftStatsByIssuer.graphql
vikiival May 11, 2023
c903c31
:coffin: removed subquery queries/simpleNft.graphql
vikiival May 11, 2023
cf53bc5
:coffin: removed subquery queries/unique/collectionCuratedList.graphql
vikiival May 11, 2023
367dcc6
:coffin: removed subquery queries/userStatsByAccount.graphql
vikiival May 11, 2023
0fb2352
:technologist: no more hacking of prefix
vikiival May 11, 2023
cfdc787
:coffin: removed obsolete function
vikiival May 11, 2023
a972cb3
:technologist: no more hacking of prefix
vikiival May 11, 2023
d82dd92
:squid: rewrote queries into SubSquid
vikiival May 11, 2023
43aa821
:ambulance: unable to build
vikiival May 11, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions components/rmrk/Create/Admin/AdminPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
Expand Down
6 changes: 3 additions & 3 deletions components/spotlight/SpotlightDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</template>

<script lang="ts">
import { Component, Prop, mixins, Watch } from 'nuxt-property-decorator'
import { Component, Prop, Watch, mixins } from 'nuxt-property-decorator'
import shouldUpdate from '@/utils/shouldUpdate'
import PrefixMixin from '@/utils/mixins/prefixMixin'
import nftSimpleListByAccount from '@/queries/nftSimpleListByAccount.graphql'
Expand Down Expand Up @@ -40,10 +40,10 @@ export default class SpotlightDetail extends mixins(PrefixMixin) {
})

const {
data: { nFTEntities },
data: { nftEntities },
} = nfts

this.nfts = nFTEntities?.nodes || []
this.nfts = nftEntities || []
}

@Watch('account', { immediate: true })
Expand Down
2 changes: 1 addition & 1 deletion components/unique/Gallery/Item/AvailableActions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

<script lang="ts">
import NFTUtils, { NFTAction } from '@/components/unique/NftUtils'
import nftById from '@/queries/nftById.graphql'
import nftById from '@/queries/subsquid/general/nftById.graphql'
import RmrkVersionMixin from '@/utils/mixins/rmrkVersionMixin'
import UseApiMixin from '@/utils/mixins/useApiMixin'
import { notificationTypes, showNotification } from '@/utils/notification'
Expand Down
17 changes: 17 additions & 0 deletions queries/collectionByAccountWithTokens.graphql
Original file line number Diff line number Diff line change
@@ -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
}
}
}

13 changes: 13 additions & 0 deletions queries/nftSimpleListByAccount.graphql
Original file line number Diff line number Diff line change
@@ -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" }
roiLeo marked this conversation as resolved.
Show resolved Hide resolved
orderBy: blockNumber_DESC
limit: $first
) {
...nft
...nftDetails
}
}