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

fix: fix space query unable to get past 30k spaces #726

Merged
merged 5 commits into from
Nov 6, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/graphql/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export function buildWhereQuery(fields, alias, where) {
export async function fetchSpaces(args) {
const { first = 20, skip = 0, where = {} } = args;

const fields = { id: 'string' };
const fields = { id: 'string', created_at: 'number' };
const whereQuery = buildWhereQuery(fields, 's', where);
const queryStr = whereQuery.query;
const params: any[] = whereQuery.params;
Expand Down
7 changes: 7 additions & 0 deletions src/graphql/schema.gql
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,12 @@ type Query {
input SpaceWhere {
id: String
id_in: [String]
created_at: Int
created_at_in: [Int]
created_at_gt: Int
created_at_gte: Int
created_at_lt: Int
created_at_lte: Int
}

input RankingWhere {
Expand Down Expand Up @@ -385,6 +391,7 @@ type Space {
verified: Boolean
flagged: Boolean
rank: Float
created_at: Int!
wa0x6e marked this conversation as resolved.
Show resolved Hide resolved
wa0x6e marked this conversation as resolved.
Show resolved Hide resolved
}

type RankingObject {
Expand Down