Skip to content

Commit

Permalink
feat(graphql): increase page size limit to 1000
Browse files Browse the repository at this point in the history
Raise the GraphQL page size limit from 100 to 1000. There's very little
performance penalty for doing this. In fact, it's probably better for
performance overall if applications to issue fewer queries and return
larger result sets. Also, if we raise the limit to 1000 then it's easy
for application to return entire blocks at a time (blocks contain a max
of 1000 transactions).
  • Loading branch information
djwhitt committed May 25, 2023
1 parent 0919e3f commit 3949a76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/routes/graphql/resolvers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import log from '../../log.js';
import { GqlTransaction } from '../../types.js';

export const DEFAULT_PAGE_SIZE = 10;
export const MAX_PAGE_SIZE = 100;
export const MAX_PAGE_SIZE = 1000;

export function getPageSize({ first }: { first?: number }) {
return Math.min(first ?? DEFAULT_PAGE_SIZE, MAX_PAGE_SIZE);
Expand Down

0 comments on commit 3949a76

Please sign in to comment.