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

[Maintanence + DX] - delete old queries and POC gql-tada #10197

Merged
merged 48 commits into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from 45 commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
3e4a27c
sql tata basic poc
daiagi May 3, 2024
1cfb1dd
Merge branch 'main' of https://github.com/kodadot/nft-gallery into PO…
daiagi May 4, 2024
5b00304
merge conflict resolution
daiagi May 4, 2024
a0cc9c0
delete unused queries
daiagi May 6, 2024
611ae24
delete more unused queries
daiagi May 6, 2024
e9fce6e
arrange clients
daiagi May 6, 2024
353f4bc
ts fragments
daiagi May 6, 2024
6e1a9c6
typify profileTabsCount
daiagi May 6, 2024
5b05c09
delete dead spotlight page
daiagi May 6, 2024
c1bcc67
more fragments
daiagi May 6, 2024
c3cedaf
remove dead carousel
daiagi May 6, 2024
d76b39b
delete unused unique `nftListSold` query
daiagi May 6, 2024
1350fb5
all unique queries are unused
daiagi May 6, 2024
a0cb214
delete more dead components
daiagi May 6, 2024
c8ffaf4
clean commented out dead code
daiagi May 6, 2024
84abe65
delete most of queries/rmrk/subsquid folder
daiagi May 6, 2024
9c5fea1
restore series-insignt page
daiagi May 6, 2024
5e1a7c6
datetime scalar type
daiagi May 6, 2024
eefa94e
buyEventsByProfile query
daiagi May 6, 2024
f3a899a
collectionBuyEventStatsById
daiagi May 6, 2024
4c9411d
collectionByAccount query
daiagi May 6, 2024
293bcbb
unmask fragments
daiagi May 6, 2024
328df60
collectionById query
daiagi May 6, 2024
5977c8c
profileStatsByIdRefined query
daiagi May 6, 2024
0afb963
Merge branch 'main' of https://github.com/kodadot/nft-gallery into PO…
daiagi May 6, 2024
6708e5c
fix collectionBanner
daiagi May 6, 2024
a9e49b7
Merge branch 'main' into POC-gql-tada
daiagi May 6, 2024
241bf71
Merge branch 'main' into POC-gql-tada
daiagi May 6, 2024
b88c476
clear seriesTable changes
daiagi May 6, 2024
924edba
clear again
daiagi May 6, 2024
9a423f1
Merge branch 'main' into POC-gql-tada
daiagi May 7, 2024
042acfa
Merge branch 'main' into POC-gql-tada
daiagi May 8, 2024
8c831bf
Merge branch 'main' of https://github.com/kodadot/nft-gallery into PO…
daiagi May 12, 2024
df8ae23
Merge branch 'POC-gql-tada' of https://github.com/kodadot/nft-gallery…
daiagi May 12, 2024
a0c963b
remove chains introspection from tsconfig
daiagi May 12, 2024
8a2e427
delete unused clients
daiagi May 12, 2024
8402894
name fixes
daiagi May 12, 2024
b74a147
remove debug logs
daiagi May 12, 2024
062c237
.gitignore is now working
daiagi May 12, 2024
1896613
gitignore stuff
daiagi May 12, 2024
46a908c
remove spotlight from nuxt config
daiagi May 13, 2024
3d9523d
seperate typed fragments
daiagi May 13, 2024
f6fab6f
move introspection files
daiagi May 13, 2024
382c720
improve `convertMarkdownToText` type signature
daiagi May 13, 2024
987ad74
delete silly comment
daiagi May 13, 2024
74baff3
remove nftSubsquid typed fragment
daiagi May 13, 2024
c8e514f
Merge branch 'main' into POC-gql-tada
vikiival May 13, 2024
4dffbc6
Merge branch 'main' of https://github.com/kodadot/nft-gallery into PO…
daiagi May 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,6 @@ sitemap.xml
/test-results/
/playwright-report/
/playwright/.cache/


queries/clients/*.d.ts
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"deno.enable": false,
"deno.enable": false,
"typescript.tsdk": "node_modules/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true

}
7 changes: 0 additions & 7 deletions components/Navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,6 @@
:chain="urlPrefix"
@select="showMobileNavbar" />

<!-- commenting as part of #5889-->
<!-- <StatsDropdown
class="navbar-stats custom-navbar-item"
data-testid="stats"
:is-mobile="isMobile"
:chain="urlPrefix" /> -->

<MobileExpandableSection
v-slot="{ onCloseMobileSubMenu }"
class="lg:!hidden"
Expand Down
14 changes: 0 additions & 14 deletions components/carousel/CarouselTypeSpotlight.vue

This file was deleted.

90 changes: 0 additions & 90 deletions components/carousel/utils/useCarouselSpotlight.ts

This file was deleted.

24 changes: 13 additions & 11 deletions components/collection/CollectionHeader/CollectionBanner.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,19 @@ import { sanitizeIpfsUrl, toOriginalContentUrl } from '@/utils/ipfs'
import HeroButtons from '@/components/collection/HeroButtons.vue'
import { generateCollectionImage } from '@/utils/seoImageGenerator'
import { convertMarkdownToText } from '@/utils/markdown'

import collectionById from '@/queries/subsquid/general/collectionById.query'
const NuxtImg = resolveComponent('NuxtImg')

const collectionId = computed(() => route.params.id as string)
const route = useRoute()
const { client } = usePrefix()

const { data, refetch } = useGraphql({
queryName: 'collectionById',
const { data, refresh: refetch } = useAsyncQuery({
query: collectionById,
variables: {
id: collectionId.value,
},
clientId: client.value,
})

const collectionAvatar = ref('')
Expand All @@ -60,9 +62,7 @@ const bannerImageUrl = computed(
)

watch(collectionId, () => {
refetch({
id: collectionId.value,
})
refetch()
collectionAvatar.value = ''
})

Expand All @@ -76,7 +76,9 @@ watchEffect(async () => {
collectionAvatar.value = sanitizeIpfsUrl(image)
collectionName.value = name
} else {
const meta = (await processSingleMetadata(metadata)) as NFTMetadata
const meta = (await processSingleMetadata(
metadata as string,
)) as NFTMetadata
const metaImage = sanitizeIpfsUrl(meta?.image)
const metaName = meta?.name

Expand All @@ -93,21 +95,21 @@ watchEffect(async () => {
useSeoMeta({
title: collectionName,
description: () =>
convertMarkdownToText(data.value?.collectionEntity.meta?.description),
convertMarkdownToText(data.value?.collectionEntity?.meta?.description),
preschian marked this conversation as resolved.
Show resolved Hide resolved
ogUrl: route.path,
ogTitle: collectionName,
ogDescription: () =>
convertMarkdownToText(data.value?.collectionEntity.meta?.description),
convertMarkdownToText(data.value?.collectionEntity?.meta?.description),
ogImage: () =>
generateCollectionImage(
collectionName.value,
data.value?.nftEntitiesConnection.totalCount,
data.value?.nftEntitiesConnection?.totalCount,
collectionAvatar.value,
),
twitterImage: () =>
generateCollectionImage(
collectionName.value,
data.value?.nftEntitiesConnection.totalCount,
data.value?.nftEntitiesConnection?.totalCount,
collectionAvatar.value,
),
})
Expand Down
6 changes: 3 additions & 3 deletions components/collection/utils/useCollectionDetails.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { getVolume } from '@/utils/math'
import { NFT } from '@/components/rmrk/service/scheme'
import { NFTListSold } from '@/components/identity/utils/useIdentity'
import { Stats } from './types'
import collectionBuyEventStatsById from '@/queries/subsquid/general/collectionBuyEventStatsById.query'

export const useCollectionDetails = ({
collectionId,
Expand Down Expand Up @@ -57,9 +58,8 @@ export const useCollectionDetails = ({
}

export const useBuyEvents = ({ collectionId }) => {
const { data } = useGraphql({
queryPrefix: 'subsquid',
queryName: 'collectionBuyEventStatsById',
const { data } = useAsyncQuery({
query: collectionBuyEventStatsById,
variables: {
id: collectionId,
},
Expand Down
10 changes: 7 additions & 3 deletions components/common/NotificationBox/useNotification.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Event, FilterOption } from './types'
import { Interaction as _Interaction } from '@kodadot1/minimark/v1'
import { sortedEventByDate } from '@/utils/sorting'
import collectionByAccountQuery from '@/queries/subsquid/general/collectionByAccount.query'

export const Interaction = {
SALE: _Interaction.BUY,
Expand Down Expand Up @@ -41,8 +42,8 @@ export const useNotification = () => {
return block.number.toNumber()
}

const { data: collectionData } = useGraphql({
queryName: 'collectionByAccount',
const { data: collectionData } = useAsyncQuery({
query: collectionByAccountQuery,
variables: {
account: accountId.value,
},
Expand All @@ -56,7 +57,10 @@ export const useNotification = () => {
})

watch(collectionData, (result) => {
collections.value = result.collectionEntities ?? []
collections.value = result.collectionEntities.map((collection) => ({
id: collection.id,
name: collection.name ?? '',
}))
})

watch(eventData, async (result) => {
Expand Down
120 changes: 0 additions & 120 deletions components/hot/HotTable.vue

This file was deleted.