Skip to content

Commit

Permalink
feat: filter spaces by network
Browse files Browse the repository at this point in the history
  • Loading branch information
wa0x6e committed Oct 19, 2023
1 parent c390016 commit 85bb6b7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/graphql/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,11 @@ export async function fetchSpaces(args) {
params.push(where.plugins_in);
}

if (where.network) {
queryStr += " AND JSON_EXTRACT(settings, '$.network') = ?";
params.push(where.network);
}

const query = `
SELECT s.* FROM spaces s
WHERE s.deleted = 0 ${queryStr}
Expand Down
1 change: 1 addition & 0 deletions src/graphql/schema.gql
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ input SpaceWhere {
id_in: [String]
strategies_in: [String]
plugins_in: [String]
network: String
}

input RankingWhere {
Expand Down

0 comments on commit 85bb6b7

Please sign in to comment.