Skip to content

Commit

Permalink
feat: add filter for get indexers and reset testnet config (#145)
Browse files Browse the repository at this point in the history
* feat: indexers filter

* chore: reset testnet graphql

* chore: reset testcase
  • Loading branch information
HuberTRoy authored Jul 4, 2023
1 parent 0267251 commit 562ff2d
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion packages/network-config/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const RPC_ENDPOINTS = {
export const NETWORK_SUBQL_ENDPOINTS = {
mainnet: 'https://api.subquery.network/sq/subquery/kepler-network',
kepler: 'https://api.subquery.network/sq/subquery/kepler-network',
testnet: 'https://api.subquery.network/sq/subquery/kepler-network',
testnet: 'https://api.subquery.network/sq/subquery/kepler-testnet',
};

export const AIRDROP_SUBQL_ENDPOINTS = {
Expand Down
14 changes: 7 additions & 7 deletions packages/network-query/queries/network/indexers.gql
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ query GetIndexer($address: String!) {
}
}

query GetIndexers($first: Int, $offset: Int, $order: IndexersOrderBy = ID_ASC) {
indexers(
first: $first
offset: $offset
orderBy: [$order]
filter: { active: { equalTo: true } }
) {
query GetIndexers(
$first: Int
$offset: Int
$order: IndexersOrderBy = ID_ASC
$filter: IndexerFilter = { active: { equalTo: true } }
) {
indexers(first: $first, offset: $offset, orderBy: [$order], filter: $filter) {
totalCount
pageInfo {
startCursor
Expand Down
7 changes: 6 additions & 1 deletion packages/network-query/types.codegen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ const config: CodegenConfig = {
config: {
preResolveTypes: true,
namingConvention: 'keep',
avoidOptionals: true,
avoidOptionals: {
field: true,
object: false,
inputValue: false,
defaultValue: false,
},
nonOptionalTypename: true,
skipTypeNameForRoot: true,
immutableTypes: true,
Expand Down
4 changes: 1 addition & 3 deletions test/networkClient.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@

import { NetworkClient, SQNetworks } from '../packages/network-clients/src';

// TODO: reset
// const TEST_INDEXER = '0xCef192586b70e3Fc2FAD76Dd1D77983a30d38D04';
const TEST_INDEXER = '0x33b8D680e49145Bac668991f9A8e0f7681f72858';
const TEST_INDEXER = '0xCef192586b70e3Fc2FAD76Dd1D77983a30d38D04';

describe.only('network client', () => {
let client: NetworkClient;
Expand Down

0 comments on commit 562ff2d

Please sign in to comment.