Fix limit pagination (#2692)

* Fix limit parameter

* Increaze max_row for each workspaces
This commit is contained in:
martmull
2023-11-24 17:02:41 +01:00
committed by GitHub
parent d3615ba0d3
commit cefac8435b
4 changed files with 55 additions and 21 deletions

View File

@ -50,6 +50,8 @@ export class WorkspaceManagerService {
schemaName,
);
await this.setWorkspaceMaxRow(workspaceId, schemaName);
await this.workspaceMigrationService.insertStandardMigrations(workspaceId);
await this.workspaceMigrationRunnerService.executeMigrationFromPendingMigrations(
@ -217,6 +219,23 @@ export class WorkspaceManagerService {
);
}
/**
*
* We are updating the pg_graphql max_rows from 30 (default value) to 60
*
* @params workspaceId, schemaName
* @param workspaceId
*/
private async setWorkspaceMaxRow(workspaceId, schemaName) {
const workspaceDataSource =
await this.workspaceDataSourceService.connectToWorkspaceDataSource(
workspaceId,
);
await workspaceDataSource.query(
`comment on schema ${schemaName} is e'@graphql({"max_rows": 60})'`,
);
}
/**
*
* We are prefilling a few standard objects with data to make it easier for the user to get started.