Skip to content

Commit

Permalink
feat: use enums instead of strings in graphql queries (#1607)
Browse files Browse the repository at this point in the history
  • Loading branch information
juanmahidalgo authored Oct 11, 2024
1 parent fc5b1d1 commit 2eb039b
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/strategies/decentraland-wearable-rarity/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { EnumType } from 'json-to-graphql-query';
import { getAddress } from '@ethersproject/address';
import { subgraphRequest } from '../../utils';

Expand Down Expand Up @@ -53,16 +54,16 @@ export async function strategy(
__args: {
where: {
itemType_in: [
'wearable_v1',
'wearable_v2',
'smart_wearable_v1',
'emote_v1'
new EnumType('wearable_v1'),
new EnumType('wearable_v2'),
new EnumType('smart_wearable_v1'),
new EnumType('emote_v1')
],
owner_in: chunk.map((address) => address.toLowerCase()),
id_gt: ''
},
orderBy: 'id',
orderDirection: 'asc',
orderBy: new EnumType('id'),
orderDirection: new EnumType('asc'),
first: 1000
},
id: true,
Expand Down

0 comments on commit 2eb039b

Please sign in to comment.