diff --git a/backend/functions/src/schema/core/services/normal.ts b/backend/functions/src/schema/core/services/normal.ts index 2d20622..da68c1f 100644 --- a/backend/functions/src/schema/core/services/normal.ts +++ b/backend/functions/src/schema/core/services/normal.ts @@ -549,10 +549,8 @@ export class NormalService extends BaseService { whereObject.fields.push(whereOrObject); } - // set limit to args.first or args.last - //parse args.first and ensure it is less than 100 - const requestedLimit = Number(validatedArgs.first ?? validatedArgs.last); - const limit = Math.min(requestedLimit, 100) || 100; + // set limit to args.first or args.last, one of which must be provided + const limit = Number(validatedArgs.first ?? validatedArgs.last); // process sort fields const orderBy: SqlOrderByObject[] = []; @@ -584,7 +582,7 @@ export class NormalService extends BaseService { sqlParams: { where: whereObject, orderBy, - limit: limit, + limit, specialParams: { currentUserId: req.user?.id, }, diff --git a/backend/functions/src/schema/helpers/typeDef.ts b/backend/functions/src/schema/helpers/typeDef.ts index 0d476b4..3d1c369 100644 --- a/backend/functions/src/schema/helpers/typeDef.ts +++ b/backend/functions/src/schema/helpers/typeDef.ts @@ -971,6 +971,14 @@ export function generatePaginatorPivotResolverObject(params: { message: `One of first or last required`, fieldPath, }); + + // args.first or args.before cannot exceed 500 + if (Number(args.first ?? args.last) > 500) { + throw new GiraffeqlArgsError({ + message: `Cannot request more than 500 results at a time`, + fieldPath, + }); + } }, }, true diff --git a/frontend/components/interface/crud/crudRecordInterface.vue b/frontend/components/interface/crud/crudRecordInterface.vue index a039679..77070c9 100644 --- a/frontend/components/interface/crud/crudRecordInterface.vue +++ b/frontend/components/interface/crud/crudRecordInterface.vue @@ -329,6 +329,7 @@ v-for="(headerItem, i) in headers" :key="i" :class="headerItem.align ? 'text-' + headerItem.align : null" + class="truncate" >