Skip to content

Commit 81a6569

Browse files
perf: increase Office365 calendarView page size to 999 to minimize pagination (calcom#27407)
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
1 parent 47becd4 commit 81a6569

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

packages/app-store/office365calendar/lib/CalendarService.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,9 @@ class Office365CalendarService implements Calendar {
369369
dateFromParsed.toISOString()
370370
)}&endDateTime=${encodeURIComponent(dateToParsed.toISOString())}`;
371371

372-
const calendarSelectParams = "$select=showAs,start,end";
372+
// Request maximum page size (999) to minimize pagination rounds
373+
// Microsoft Graph allows up to 999 items per page for calendarView
374+
const calendarSelectParams = "$select=showAs,start,end&$top=999";
373375

374376
try {
375377
const selectedCalendarIds = selectedCalendars.reduce((calendarIds, calendar) => {

0 commit comments

Comments
 (0)