diff --git a/packages/apps/examples/icy-graphql-client/recordings/query-getNFTsByWallet_2251452679/recording.har b/packages/apps/examples/icy-graphql-client/recordings/query-getNFTsByWalletENS_3517593009/recording.har similarity index 60% rename from packages/apps/examples/icy-graphql-client/recordings/query-getNFTsByWallet_2251452679/recording.har rename to packages/apps/examples/icy-graphql-client/recordings/query-getNFTsByWalletENS_3517593009/recording.har index e0280791..ce1a0c59 100644 --- a/packages/apps/examples/icy-graphql-client/recordings/query-getNFTsByWallet_2251452679/recording.har +++ b/packages/apps/examples/icy-graphql-client/recordings/query-getNFTsByWalletENS_3517593009/recording.har @@ -1,6 +1,6 @@ { "log": { - "_recordingName": "query-getNFTsByWallet", + "_recordingName": "query-getNFTsByWalletENS", "creator": { "comment": "persister:fs", "name": "Polly.JS", @@ -8,11 +8,11 @@ }, "entries": [ { - "_id": "00b6f5570aceb897a9191b61ab5e799b", + "_id": "6136c5e34d619709b16c00d27396c49b", "_order": 0, "cache": {}, "request": { - "bodySize": 901, + "bodySize": 864, "cookies": [], "headers": [ { @@ -28,7 +28,7 @@ { "_fromType": "array", "name": "content-length", - "value": "901" + "value": "864" }, { "_fromType": "array", @@ -56,24 +56,24 @@ "postData": { "mimeType": "application/json", "params": [], - "text": "{\"operationName\":\"WalletNFTs\",\"variables\":{\"ensName\":\"vitalik.eth\",\"first\":5},\"query\":\"query WalletNFTs($address: String, $ensName: String, $first: Int, $after: String) {\\n wallet(address: $address, ensName: $ensName) {\\n ensName\\n address\\n tokens(first: $first, after: $after) {\\n pageInfo {\\n hasNextPage\\n endCursor\\n __typename\\n }\\n edges {\\n node {\\n tokenId\\n images {\\n url\\n __typename\\n }\\n ... on ERC721Token {\\n contract {\\n address\\n ... on ERC721Contract {\\n symbol\\n name\\n __typename\\n }\\n __typename\\n }\\n __typename\\n }\\n __typename\\n }\\n __typename\\n }\\n __typename\\n }\\n __typename\\n }\\n}\"}" + "text": "{\"operationName\":\"WalletNFTs\",\"variables\":{\"ensName\":\"vitalik.eth\",\"first\":5},\"query\":\"query WalletNFTs($ensName: String, $first: Int, $after: String) {\\n wallet(ensName: $ensName) {\\n ensName\\n address\\n tokens(first: $first, after: $after) {\\n pageInfo {\\n hasNextPage\\n endCursor\\n __typename\\n }\\n edges {\\n node {\\n tokenId\\n images {\\n url\\n __typename\\n }\\n ... on ERC721Token {\\n contract {\\n address\\n ... on ERC721Contract {\\n symbol\\n name\\n __typename\\n }\\n __typename\\n }\\n __typename\\n }\\n __typename\\n }\\n __typename\\n }\\n __typename\\n }\\n __typename\\n }\\n}\"}" }, "queryString": [], "url": "https://graphql.icy.tools/graphql" }, "response": { - "bodySize": 1107, + "bodySize": 688, "content": { "encoding": "base64", "mimeType": "application/json; charset=utf-8", - "size": 1107, - "text": "[\"H4sIAAAAAAAAA9WY32/bNhCA3/tXCHragDQWf4sB9pA6yeAWcd11RdIORXEkj4kaWwpEuXUa+H8fbdeLVxVBBsSe8iYfxbvvSOET5dvUQQPpwW36FcZjbBZXWIYhTDA9SL8UDYyLq31sLtO9FJyrMYQYz2YudyCNp1JLDl47heg0ZgwF40Q4pgC0zLiI05rqKmZcJL6GCxyUvlpcX0IY4qwZxVB60NRT3It1XX9ah6qOFd6fv7x5fz7+bKiYfjgbZnCmp68/v/kt5vv0qbm5xnJFOFqnnMf57gJjnb9u07JyuCiyLD1w8T6WCx3nFhNY3zOtxzF+2TTX4aDXWw3sF/amqapx2P9a1VdYh32HX3qz0LNVXBzbFFUZetkMgEtKMumAc2UzzjPgBqmWhFuiWa5AaGCM9Fat95hwBj1VziiSc2K9YNIQrhUorzyIH5v6c4m9IIpt/RfSMHkqpBP3VEjHF0+FdDb+H0k/7qW2Kpsa7NIhm654KEZMH24mplr0ezx8e3p4PngbY9+LxUhyCrMi/Ehx/EdfUdJfF5//dHiJ2hpbRo/d95VuW4Pn5NGkQWmuiNEqmhE5c5x7FJnzGfOSUcK4ZciQ6+yfzcg1iEzHFSNSgF1sivI293E1BVfUbU8anSVtSaOzpC1pdJa0JY1dkt4jj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rh/GfzUoeStBo7cSlP53Qe9eaznRer/8TkYn+3+b7Xb77hn3tb/V8QgAAA==\"]" }, "cookies": [], "headers": [ { "name": "date", - "value": "Wed, 07 Sep 2022 14:08:30 GMT" + "value": "Thu, 15 Sep 2022 17:05:04 GMT" }, { "name": "content-type", @@ -109,7 +109,7 @@ }, { "name": "x-ratelimit-rpsreset", - "value": "1662559709" + "value": "1663261504" }, { "name": "x-ratelimit-rpmlimit", @@ -121,11 +121,11 @@ }, { "name": "x-ratelimit-rpmreset", - "value": "1662559709" + "value": "1663261504" }, { "name": "etag", - "value": "W/\"12e4-VPbsFmPwFarOnC4Lbbnh3BY3amA\"" + "value": "W/\"8f1-WOk+2CYMfiXEshmSzT39GeFlkjE\"" }, { "name": "content-encoding", @@ -141,17 +141,17 @@ }, { "name": "cf-ray", - "value": "747004416a50a79c-EZE" + "value": "74b2f1ec9f10c19b-EZE" } ], - "headersSize": 562, + "headersSize": 561, "httpVersion": "HTTP/1.1", "redirectURL": "", "status": 200, "statusText": "OK" }, - "startedDateTime": "2022-09-07T14:08:28.010Z", - "time": 2473, + "startedDateTime": "2022-09-15T17:05:03.077Z", + "time": 978, "timings": { "blocked": -1, "connect": -1, @@ -159,7 +159,7 @@ "receive": 0, "send": 0, "ssl": -1, - "wait": 2473 + "wait": 978 } } ], diff --git a/packages/apps/examples/icy-graphql-client/src/controllers/nft.controller.spec.ts b/packages/apps/examples/icy-graphql-client/src/controllers/nft.controller.spec.ts index 955a7cf2..84926842 100644 --- a/packages/apps/examples/icy-graphql-client/src/controllers/nft.controller.spec.ts +++ b/packages/apps/examples/icy-graphql-client/src/controllers/nft.controller.spec.ts @@ -4,7 +4,7 @@ import { app } from '../app'; describe('nft controller', () => { it('works', async () => { - await withPolly({ recordingName: 'query-getNFTsByWallet' }, async () => { + await withPolly({ recordingName: 'query-getNFTsByWalletENS' }, async () => { const response = await request(app) .get('/api/nftsByEns/vitalik.eth') .set('Accept', 'application/json') @@ -19,112 +19,64 @@ describe('nft controller', () => { tokens: [ { contract: { - address: '0xaa462106da447c0440a4be29614c19387a59a331', - name: 'ENS Maxis', - symbol: 'ENSMAXIS', + address: '0xa1f92f70dce96c7cd32aafd93cd4bff7debdf853', + name: 'Cosmic Corpse Society V2', + symbol: 'CCS', }, images: [ { - url: 'https://images.icytools.workers.dev/xs/collections/0xaa462106da447c0440a4be29614c19387a59a331/tokens/35dbef27db71841cf536b1497a7f7fa5', + url: 'https://images.icytools.workers.dev/xs/collections/0xa1f92f70dce96c7cd32aafd93cd4bff7debdf853/tokens/9e4260ceae4f53a5c1ee1ef2bf53dea2', }, { - url: 'https://images.icytools.workers.dev/sm/collections/0xaa462106da447c0440a4be29614c19387a59a331/tokens/35dbef27db71841cf536b1497a7f7fa5', + url: 'https://images.icytools.workers.dev/sm/collections/0xa1f92f70dce96c7cd32aafd93cd4bff7debdf853/tokens/9e4260ceae4f53a5c1ee1ef2bf53dea2', }, { - url: 'https://images.icytools.workers.dev/md/collections/0xaa462106da447c0440a4be29614c19387a59a331/tokens/35dbef27db71841cf536b1497a7f7fa5', + url: 'https://images.icytools.workers.dev/md/collections/0xa1f92f70dce96c7cd32aafd93cd4bff7debdf853/tokens/9e4260ceae4f53a5c1ee1ef2bf53dea2', }, { - url: 'https://images.icytools.workers.dev/lg/collections/0xaa462106da447c0440a4be29614c19387a59a331/tokens/35dbef27db71841cf536b1497a7f7fa5', + url: 'https://images.icytools.workers.dev/lg/collections/0xa1f92f70dce96c7cd32aafd93cd4bff7debdf853/tokens/9e4260ceae4f53a5c1ee1ef2bf53dea2', }, { - url: 'https://images.icytools.workers.dev/xl/collections/0xaa462106da447c0440a4be29614c19387a59a331/tokens/35dbef27db71841cf536b1497a7f7fa5', + url: 'https://images.icytools.workers.dev/xl/collections/0xa1f92f70dce96c7cd32aafd93cd4bff7debdf853/tokens/9e4260ceae4f53a5c1ee1ef2bf53dea2', }, ], - tokenId: '3859', + tokenId: '162', }, { contract: { - address: '0x22871b977aae43d44fe50df03f632134c3e3e490', - name: 'UDID Network Genesis Pass Card', - symbol: 'UFPC', + address: '0x451a0d4c5f834dc45459b47e18ecdbc2b6ff5d6e', + name: 'Merge Your NFT', + symbol: 'SETMERGE', }, - images: [ - { - url: 'https://images.icytools.workers.dev/xs/collections/0x22871b977aae43d44fe50df03f632134c3e3e490/tokens/389a50947c165ac7db77fc8faa45472d', - }, - { - url: 'https://images.icytools.workers.dev/sm/collections/0x22871b977aae43d44fe50df03f632134c3e3e490/tokens/389a50947c165ac7db77fc8faa45472d', - }, - { - url: 'https://images.icytools.workers.dev/md/collections/0x22871b977aae43d44fe50df03f632134c3e3e490/tokens/389a50947c165ac7db77fc8faa45472d', - }, - { - url: 'https://images.icytools.workers.dev/lg/collections/0x22871b977aae43d44fe50df03f632134c3e3e490/tokens/389a50947c165ac7db77fc8faa45472d', - }, - { - url: 'https://images.icytools.workers.dev/xl/collections/0x22871b977aae43d44fe50df03f632134c3e3e490/tokens/389a50947c165ac7db77fc8faa45472d', - }, - ], - tokenId: '481', + images: [], + tokenId: '431', }, { contract: { - address: '0x04c87b76b73ed706d4aac567e3adccb994591b1b', - name: 'A3S Protocol (Ethereum)', - symbol: 'A3S', + address: '0x451a0d4c5f834dc45459b47e18ecdbc2b6ff5d6e', + name: 'Merge Your NFT', + symbol: 'SETMERGE', }, images: [], - tokenId: '9', + tokenId: '432', }, { contract: { - address: '0x6c0f9679de42ca516e0aaeb3a661d3acc1fc04a8', - name: 'Dickenzas', - symbol: 'DKNZA', + address: '0x451a0d4c5f834dc45459b47e18ecdbc2b6ff5d6e', + name: 'Merge Your NFT', + symbol: 'SETMERGE', }, - images: [ - { - url: 'https://images.icytools.workers.dev/xs/collections/0x6c0f9679de42ca516e0aaeb3a661d3acc1fc04a8/tokens/970196b9ad7dea85b9aa14f7fec1c5bb', - }, - { - url: 'https://images.icytools.workers.dev/sm/collections/0x6c0f9679de42ca516e0aaeb3a661d3acc1fc04a8/tokens/970196b9ad7dea85b9aa14f7fec1c5bb', - }, - { - url: 'https://images.icytools.workers.dev/md/collections/0x6c0f9679de42ca516e0aaeb3a661d3acc1fc04a8/tokens/970196b9ad7dea85b9aa14f7fec1c5bb', - }, - { - url: 'https://images.icytools.workers.dev/lg/collections/0x6c0f9679de42ca516e0aaeb3a661d3acc1fc04a8/tokens/970196b9ad7dea85b9aa14f7fec1c5bb', - }, - { - url: 'https://images.icytools.workers.dev/xl/collections/0x6c0f9679de42ca516e0aaeb3a661d3acc1fc04a8/tokens/970196b9ad7dea85b9aa14f7fec1c5bb', - }, - ], - tokenId: '1598', + images: [], + tokenId: '433', }, { contract: { - address: '0x7afc0d1432ccc262ff44337b9567f4ea4dfbd31d', - name: 'Best Friend - OfficaI', - symbol: 'BF', + address: '0x451a0d4c5f834dc45459b47e18ecdbc2b6ff5d6e', + name: 'Merge Your NFT', + symbol: 'SETMERGE', }, - images: [ - { - url: 'https://images.icytools.workers.dev/xs/collections/0x7afc0d1432ccc262ff44337b9567f4ea4dfbd31d/tokens/53c5e02a7cba1cfba21d98c8b8882535', - }, - { - url: 'https://images.icytools.workers.dev/sm/collections/0x7afc0d1432ccc262ff44337b9567f4ea4dfbd31d/tokens/53c5e02a7cba1cfba21d98c8b8882535', - }, - { - url: 'https://images.icytools.workers.dev/md/collections/0x7afc0d1432ccc262ff44337b9567f4ea4dfbd31d/tokens/53c5e02a7cba1cfba21d98c8b8882535', - }, - { - url: 'https://images.icytools.workers.dev/lg/collections/0x7afc0d1432ccc262ff44337b9567f4ea4dfbd31d/tokens/53c5e02a7cba1cfba21d98c8b8882535', - }, - { - url: 'https://images.icytools.workers.dev/xl/collections/0x7afc0d1432ccc262ff44337b9567f4ea4dfbd31d/tokens/53c5e02a7cba1cfba21d98c8b8882535', - }, - ], - tokenId: '3224', + images: [], + tokenId: '434', }, ], tokensPageInfo: { diff --git a/packages/apps/examples/icy-graphql-client/testSetup/pollyTestSetup.ts b/packages/apps/examples/icy-graphql-client/testSetup/pollyTestSetup.ts index 0bef3da4..52664d9c 100644 --- a/packages/apps/examples/icy-graphql-client/testSetup/pollyTestSetup.ts +++ b/packages/apps/examples/icy-graphql-client/testSetup/pollyTestSetup.ts @@ -1,4 +1,3 @@ -/* eslint @typescript-eslint/ban-ts-comment: "off" */ import NodeHttpAdapter from '@pollyjs/adapter-node-http'; import { Polly } from '@pollyjs/core'; import FileSystemPersister from '@pollyjs/persister-fs'; diff --git a/packages/libs/api/icy-graphql-client/.eslintrc.json b/packages/libs/api/icy-graphql-client/.eslintrc.json index 632e9b0e..c012674b 100644 --- a/packages/libs/api/icy-graphql-client/.eslintrc.json +++ b/packages/libs/api/icy-graphql-client/.eslintrc.json @@ -4,7 +4,9 @@ "overrides": [ { "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], - "rules": {} + "rules": { + "@typescript-eslint/ban-ts-comment": "off" + } }, { "files": ["*.ts", "*.tsx"], diff --git a/packages/libs/api/icy-graphql-client/src/client/client.ts b/packages/libs/api/icy-graphql-client/src/client/client.ts index 4bd0a725..46325636 100644 --- a/packages/libs/api/icy-graphql-client/src/client/client.ts +++ b/packages/libs/api/icy-graphql-client/src/client/client.ts @@ -15,7 +15,9 @@ export interface IcyClientArguments { } const ICY_GRAPHQL_CLIENT_SUPPRESS_WARNINGS = - // eslint-disable-next-line @typescript-eslint/ban-ts-comment + /** + * @todo set unified config util + */ // @ts-ignore process.env.ICY_GRAPHQL_CLIENT_SUPPRESS_WARNINGS === 'true' ? true : false; @@ -28,7 +30,6 @@ const errorLink = onError(({ networkError }) => { /** * @todo fix this type by overriding */ - // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore typing is not correct from apollo client, statusCode can be included in networkError networkError?.statusCode === 429 && !ICY_GRAPHQL_CLIENT_SUPPRESS_WARNINGS diff --git a/packages/libs/api/icy-graphql-client/testSetup/pollyTestSetup.ts b/packages/libs/api/icy-graphql-client/testSetup/pollyTestSetup.ts index a3451a37..15aa0017 100644 --- a/packages/libs/api/icy-graphql-client/testSetup/pollyTestSetup.ts +++ b/packages/libs/api/icy-graphql-client/testSetup/pollyTestSetup.ts @@ -1,4 +1,3 @@ -/* eslint @typescript-eslint/ban-ts-comment: "off" */ import NodeHttpAdapter from '@pollyjs/adapter-node-http'; import { Polly } from '@pollyjs/core'; import FileSystemPersister from '@pollyjs/persister-fs';