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

[WEB-2001]feat: Cache issues on the client #5327

Merged
merged 133 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from 131 commits
Commits
Show all changes
133 commits
Select commit Hold shift + click to select a range
957e981
use common getIssues from issue service instead of multiple different…
rahulramesha Jul 29, 2024
ede4d43
Merge remote-tracking branch 'origin/chore-common-getIssues-API' into…
SatishGandham Jul 30, 2024
cc0d229
Use SQLite to store issues locally and load issues from it.
SatishGandham Jul 31, 2024
915757c
Fix incorrect total count and filtering on assignees.
SatishGandham Jul 31, 2024
0656de2
enable parallel API calls
rahulramesha Jul 31, 2024
f8d78ac
use common getIssues from issue service instead of multiple different…
rahulramesha Jul 29, 2024
5edfb5c
Use SQLite to store issues locally and load issues from it.
SatishGandham Jul 31, 2024
52b495d
Fix incorrect total count and filtering on assignees.
SatishGandham Jul 31, 2024
322e9a9
enable parallel API calls
rahulramesha Jul 31, 2024
705f23f
chore: deleted issue list
NarayanBavisetti Aug 6, 2024
8ecdd12
- Handle local mutations
SatishGandham Aug 7, 2024
5e120f7
Wait for sync to complete in get issues
SatishGandham Aug 7, 2024
620bd0c
Fix build errors
SatishGandham Aug 7, 2024
0e4f54f
Merge branch 'feat_no_loader_SQLite' of https://github.com/makeplane/…
SatishGandham Aug 7, 2024
4e85f00
Fix build issue
SatishGandham Aug 7, 2024
48a8043
- Sync updates to local-db
SatishGandham Aug 9, 2024
d315728
Add issues in batches
SatishGandham Aug 12, 2024
537ed92
Disable skeleton loaders for first 10 issues
SatishGandham Aug 13, 2024
21b3924
Load issues in bulk
SatishGandham Aug 13, 2024
d2f530f
working version of sql lite with grouped issues
rahulramesha Aug 14, 2024
6c7a13d
Merge branch 'feat-noloader-sqlite' of github.com:makeplane/plane int…
rahulramesha Aug 14, 2024
2fdf4f4
Use window queries for group by
SatishGandham Aug 16, 2024
35d2397
- Fix sort by date fields
SatishGandham Aug 16, 2024
3617ae7
- Fix grouping by created by
SatishGandham Aug 16, 2024
0cbb164
fix pagination
rahulramesha Aug 16, 2024
d67d5c0
Fix sorting on issue priority
SatishGandham Aug 16, 2024
174e079
- Add secondary sort order
SatishGandham Aug 16, 2024
7816667
chore: added timestamp filter for deleted issues
NarayanBavisetti Aug 20, 2024
53fe270
Merge branch 'feat-noloader-sqlite' of github.com:makeplane/plane int…
NarayanBavisetti Aug 20, 2024
107ba8f
- Extract local DB into its own class
SatishGandham Aug 20, 2024
e75f7b1
Implement subgroup by
SatishGandham Aug 20, 2024
3ac9132
sub group by changes
rahulramesha Aug 20, 2024
673b2fb
Refactor query constructor
SatishGandham Aug 21, 2024
3c8b27d
Insert or update issues instead of directly adding them.
SatishGandham Aug 22, 2024
1a1eb0d
Segregated queries. Not working though!!
SatishGandham Aug 22, 2024
59b19fa
- Get filtered issues and then group them.
SatishGandham Aug 25, 2024
ac40489
Fix build issues
SatishGandham Aug 25, 2024
4215094
Remove debuggers
SatishGandham Aug 25, 2024
5dc8a82
remove loaders while changing sorting or applying filters
rahulramesha Aug 26, 2024
64ba84c
Merge branch 'feat-noloader-sqlite' of github.com:makeplane/plane int…
rahulramesha Aug 26, 2024
83e7b4f
fix loader while clearing all filters
rahulramesha Aug 26, 2024
d3b9e10
Fix issue with project being synced twice
SatishGandham Aug 26, 2024
40704c1
Improve project sync
SatishGandham Aug 26, 2024
7f3ec53
Optimize the queries
SatishGandham Aug 27, 2024
317ae96
Make create dummy data more realistic
SatishGandham Aug 27, 2024
c7899c6
Merge branch 'preview' into feat-noloader-sqlite
SatishGandham Aug 27, 2024
fae4314
dev: added total pages in the global paginator
gurusainath Aug 27, 2024
921c142
chore: updated total_paged count
gurusainath Aug 27, 2024
06b1ecf
chore: added state_group in the issues pagination
gurusainath Aug 27, 2024
8bc1924
chore: removed deleted_at from the issue pagination payload
gurusainath Aug 27, 2024
5600257
chore: replaced state_group with state__group
gurusainath Aug 28, 2024
83d2384
Integrate new getIssues API, and fix sync issues bug.
SatishGandham Aug 28, 2024
9dc26b6
Fix issue with SWR running twice in workspace wrapper
SatishGandham Aug 28, 2024
0305e7d
Fix DB initialization called when opening project for the first time.
SatishGandham Aug 28, 2024
ef7ca4e
Add all the tables required for sorting
SatishGandham Aug 29, 2024
79a2b94
Exclude description from getIssues
SatishGandham Aug 29, 2024
ec0a2a5
Add getIssue function.
SatishGandham Aug 29, 2024
87a9c38
Add only selected fields to get query.
SatishGandham Aug 29, 2024
43fe5af
Fix the count query
SatishGandham Aug 29, 2024
24e6b3c
Minor query optimization when no joins are required.
SatishGandham Aug 30, 2024
cb682ef
fetch issue description from local db
rahulramesha Aug 30, 2024
76c2d92
Merge branch 'feat-noloader-sqlite' of github.com:makeplane/plane int…
rahulramesha Aug 30, 2024
6bf6a06
clear local db on signout
rahulramesha Aug 30, 2024
14101e8
Correct dummy data creation
SatishGandham Aug 30, 2024
c6194d8
Merge branch 'feat-noloader-sqlite' of https://github.com/makeplane/p…
SatishGandham Aug 30, 2024
02700ba
Fix sort by assignee
SatishGandham Aug 30, 2024
7d5ab1b
sync to local changes
rahulramesha Aug 30, 2024
5394416
Merge branch 'feat-noloader-sqlite' of github.com:makeplane/plane int…
rahulramesha Aug 30, 2024
d430b68
chore: added archived issues in the deleted endpoint
NarayanBavisetti Aug 30, 2024
ae5dfe0
Sync deletes to local db.
SatishGandham Sep 2, 2024
d9a0ae2
- Add missing indexes for tables used in sorting in spreadsheet layout.
SatishGandham Sep 2, 2024
d43c34c
Make fallback optional in getOption
SatishGandham Sep 2, 2024
45d8538
Kanban column virtualization
rahulramesha Sep 2, 2024
25afc04
Merge branch 'feat-noloader-sqlite' of github.com:makeplane/plane int…
rahulramesha Sep 2, 2024
c63ea98
persist project sync readiness to sqlite and use that as the source o…
rahulramesha Sep 2, 2024
d93a1d4
fix build errors
rahulramesha Sep 2, 2024
be83dd1
Merge branch 'preview' into feat-noloader-sqlite
SatishGandham Sep 3, 2024
1263650
Fix calendar view
SatishGandham Sep 3, 2024
7ee6fea
fetch slimed down version of modules in project wrapper
rahulramesha Sep 3, 2024
6a493bf
Merge branch 'preview' of github.com:makeplane/plane into feat-noload…
rahulramesha Sep 3, 2024
42fb1d7
fetch toned down modules and then fetch complete modules
rahulramesha Sep 3, 2024
89ae846
Fix multi value order by in spread sheet layout
SatishGandham Sep 3, 2024
5bc359d
Fix sort by
SatishGandham Sep 3, 2024
89f43ad
Fix the query when ordering by multi field names
SatishGandham Sep 4, 2024
2c4c241
Remove unused import
SatishGandham Sep 4, 2024
7e66115
Fix sort by multi value fields
SatishGandham Sep 4, 2024
e63bcc4
Format queries and fix order by
SatishGandham Sep 4, 2024
7238b18
fix order by for multi issue
rahulramesha Sep 4, 2024
a1522b1
fix loaders for spreadsheet
rahulramesha Sep 4, 2024
0f45b56
Fallback to manual order whn moving away from spreadsheet layout
SatishGandham Sep 4, 2024
33c0cfe
Merge branch 'preview' into feat-noloader-sqlite
SatishGandham Sep 4, 2024
f6e58ce
fix minor bug
rahulramesha Sep 4, 2024
a1da35f
Move fix for order_by when switching from spreadsheet layout to trans…
SatishGandham Sep 5, 2024
4c901a9
Merge branch 'feat-noloader-sqlite' of https://github.com/makeplane/p…
SatishGandham Sep 5, 2024
3527a7b
fix default rendering of kanban groups
rahulramesha Sep 5, 2024
0de0db7
Merge branch 'feat-noloader-sqlite' of https://github.com/makeplane/p…
SatishGandham Sep 5, 2024
ece0b21
Fix none priority being saved as null
SatishGandham Sep 5, 2024
f191df9
Merge branch 'preview' of github.com:makeplane/plane into feat-noload…
rahulramesha Sep 5, 2024
08f57a8
Remove debugger statement
SatishGandham Sep 5, 2024
2fc8ab5
Fix issue load
SatishGandham Sep 5, 2024
b791b31
chore: updated isue paginated query from to
gurusainath Sep 9, 2024
6b2d5ad
Fix sub issues and start and target date filters
SatishGandham Sep 6, 2024
ffd18cd
Fix active and backlog filter
SatishGandham Sep 6, 2024
e39d17c
Add default order by
SatishGandham Sep 6, 2024
bce8f2d
Update the Query param to match with backend.
SatishGandham Sep 9, 2024
799aeab
local sqlite db versioning
rahulramesha Sep 10, 2024
13a7a5f
When window is hidden, do not perform any db versioning
rahulramesha Sep 10, 2024
f983337
fix error handling and fall back to server when database errors out
rahulramesha Sep 10, 2024
ea83e3c
Add ability to disable local db cache
rahulramesha Sep 11, 2024
a903aec
remove db version check from getIssues function
rahulramesha Sep 11, 2024
052d5ec
change db version to number and remove workspaceInitPromise in storag…
rahulramesha Sep 11, 2024
1e74d88
- Sync the entire workspace in the background
SatishGandham Sep 13, 2024
8f0dee9
Make changes to get issues for sync to match backend.
SatishGandham Sep 13, 2024
e53bc00
chore: handled workspace and project in v2 paginted issues
gurusainath Sep 13, 2024
9a204dd
Merge branch 'feat-noloader-sqlite' of gurusainath:makeplane/plane in…
gurusainath Sep 13, 2024
cb3e8be
disable issue description and title until fetched from server
rahulramesha Sep 13, 2024
6ccdaa4
sync issues post bulk operations
rahulramesha Sep 13, 2024
b117e1c
Merge branch 'preview' of github.com:makeplane/plane into feat-noload…
rahulramesha Sep 13, 2024
5b957f4
fix server error
rahulramesha Sep 13, 2024
c2fd781
fix front end build
rahulramesha Sep 13, 2024
8390f6d
Remove full workspace sync
SatishGandham Sep 18, 2024
8787072
Merge branch 'preview' of https://github.com/makeplane/plane into fea…
SatishGandham Sep 18, 2024
282bcee
Merge branch 'preview' of https://github.com/makeplane/plane into fea…
SatishGandham Sep 19, 2024
d4e71f5
- Remove the toast message on sync.
SatishGandham Sep 23, 2024
9aa8a7c
Add Hardcoded constant to disable the local db caching
rahulramesha Sep 23, 2024
f2f2fca
fix lint errors
rahulramesha Sep 23, 2024
00685a8
Fix order by in grouping
SatishGandham Sep 24, 2024
9d3055a
Merge branch 'feat-noloader-sqlite' of https://github.com/makeplane/p…
SatishGandham Sep 24, 2024
81ed15a
Merge branch 'preview' of github.com:makeplane/plane into feat-noload…
rahulramesha Sep 24, 2024
b1d8edb
update yarn lock
rahulramesha Sep 24, 2024
7fd7e67
fix build
rahulramesha Sep 24, 2024
5a16b2e
fix plane-web imports
rahulramesha Sep 24, 2024
f220592
address review comments
rahulramesha Sep 24, 2024
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
10 changes: 8 additions & 2 deletions apiserver/plane/app/urls/issue.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
IssueViewSet,
LabelViewSet,
BulkArchiveIssuesEndpoint,
DeletedIssuesListViewSet,
IssuePaginatedViewSet,
)

Expand All @@ -39,9 +40,9 @@
),
name="project-issue",
),
# updated v1 paginated issues
# updated v2 paginated issues
path(
"workspaces/<str:slug>/projects/<uuid:project_id>/v2/issues/",
"workspaces/<str:slug>/v2/issues/",
IssuePaginatedViewSet.as_view({"get": "list"}),
name="project-issues-paginated",
),
Expand Down Expand Up @@ -311,4 +312,9 @@
),
name="project-issue-draft",
),
path(
"workspaces/<str:slug>/projects/<uuid:project_id>/deleted-issues/",
DeletedIssuesListViewSet.as_view(),
name="deleted-issues",
),
]
1 change: 1 addition & 0 deletions apiserver/plane/app/views/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@
IssueViewSet,
IssueUserDisplayPropertyEndpoint,
BulkDeleteIssuesEndpoint,
DeletedIssuesListViewSet,
IssuePaginatedViewSet,
)

Expand Down
64 changes: 50 additions & 14 deletions apiserver/plane/app/views/issue/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,11 +234,17 @@ def get_queryset(self):
@method_decorator(gzip_page)
@allow_permission([ROLE.ADMIN, ROLE.MEMBER, ROLE.GUEST])
def list(self, request, slug, project_id):
extra_filters = {}
if request.GET.get("updated_at__gt", None) is not None:
extra_filters = {
"updated_at__gt": request.GET.get("updated_at__gt")
}

project = Project.objects.get(pk=project_id, workspace__slug=slug)
filters = issue_filters(request.query_params, "GET")
order_by_param = request.GET.get("order_by", "-created_at")

issue_queryset = self.get_queryset().filter(**filters)
issue_queryset = self.get_queryset().filter(**filters, **extra_filters)
# Custom ordering for priority and state

# Issue queryset
Expand Down Expand Up @@ -713,16 +719,43 @@ def delete(self, request, slug, project_id):
)


class DeletedIssuesListViewSet(BaseAPIView):
@allow_permission([ROLE.ADMIN, ROLE.MEMBER, ROLE.GUEST])
def get(self, request, slug, project_id):
filters = {}
if request.GET.get("updated_at__gt", None) is not None:
filters = {"updated_at__gt": request.GET.get("updated_at__gt")}
deleted_issues = (
Issue.all_objects.filter(
workspace__slug=slug,
project_id=project_id,
)
.filter(Q(archived_at__isnull=False) | Q(deleted_at__isnull=False))
.filter(**filters)
.values_list("id", flat=True)
)

return Response(deleted_issues, status=status.HTTP_200_OK)


class IssuePaginatedViewSet(BaseViewSet):
def get_queryset(self):
workspace_slug = self.kwargs.get("slug")
project_id = self.kwargs.get("project_id")

# getting the project_id from the request params
project_id = self.request.GET.get("project_id", None)

issue_queryset = Issue.issue_objects.filter(
workspace__slug=workspace_slug
)

if project_id:
issue_queryset = issue_queryset.filter(project_id=project_id)
Comment on lines +745 to +753
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Security concern: 'project_id' obtained from GET parameters without validation

In the IssuePaginatedViewSet, project_id is fetched from GET parameters in both the get_queryset (lines 745-753) and list methods (lines 796-800). Similarly, it's used in filtering the base_queryset (lines 838-840). Relying on project_id from GET parameters without proper validation and permission checks may allow unauthorized access to issues from other projects.

Recommendation:

Ensure that project_id is obtained from URL parameters or validate it thoroughly when sourced from GET parameters. Implement necessary permission checks to prevent potential security risks associated with unauthorized data access.

Also applies to: 796-800, 838-840


return (
Issue.issue_objects.filter(
workspace__slug=workspace_slug, project_id=project_id
issue_queryset.select_related(
"workspace", "project", "state", "parent"
)
.select_related("workspace", "project", "state", "parent")
.prefetch_related("assignees", "labels", "issue_module__module")
.annotate(cycle_id=F("issue_cycle__cycle_id"))
.annotate(
Expand Down Expand Up @@ -760,17 +793,18 @@ def process_paginated_result(self, fields, results, timezone):

return paginated_data

@allow_permission([ROLE.ADMIN, ROLE.MEMBER, ROLE.GUEST])
def list(self, request, slug, project_id):
def list(self, request, slug):
project_id = self.request.GET.get("project_id", None)
cursor = request.GET.get("cursor", None)
is_description_required = request.GET.get("description", False)
updated_at = request.GET.get("updated_at__gte", None)
updated_at = request.GET.get("updated_at__gt", None)

# required fields
required_fields = [
"id",
"name",
"state_id",
"state__group",
"sort_order",
"completed_at",
"estimate_point",
Expand All @@ -787,7 +821,6 @@ def list(self, request, slug, project_id):
"updated_by",
"is_draft",
"archived_at",
"deleted_at",
"module_ids",
"label_ids",
"assignee_ids",
Expand All @@ -800,15 +833,18 @@ def list(self, request, slug, project_id):
required_fields.append("description_html")

# querying issues
base_queryset = Issue.issue_objects.filter(
workspace__slug=slug, project_id=project_id
).order_by("updated_at")
base_queryset = Issue.issue_objects.filter(workspace__slug=slug)

if project_id:
base_queryset = base_queryset.filter(project_id=project_id)

base_queryset = base_queryset.order_by("updated_at")
queryset = self.get_queryset().order_by("updated_at")

# filtering issues by greater then updated_at given by the user
if updated_at:
base_queryset = base_queryset.filter(updated_at__gte=updated_at)
queryset = queryset.filter(updated_at__gte=updated_at)
base_queryset = base_queryset.filter(updated_at__gt=updated_at)
queryset = queryset.filter(updated_at__gt=updated_at)

queryset = queryset.annotate(
label_ids=Coalesce(
Expand Down
53 changes: 33 additions & 20 deletions apiserver/plane/bgtasks/dummy_data_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@
)
)

text = fake.text(max_nb_chars=60000)
text = fake.text(max_nb_chars=3000)
issues.append(
Issue(
state_id=states[random.randint(0, len(states) - 1)],
Expand Down Expand Up @@ -490,18 +490,23 @@
def create_issue_labels(workspace, project, user_id, issue_count):
# labels
labels = Label.objects.filter(project=project).values_list("id", flat=True)
issues = random.sample(
list(
# issues = random.sample(
# list(
# Issue.objects.filter(project=project).values_list("id", flat=True)
# ),
# int(issue_count / 2),
# )
issues = list(
Issue.objects.filter(project=project).values_list("id", flat=True)
),
int(issue_count / 2),
)
)

Check notice on line 501 in apiserver/plane/bgtasks/dummy_data_task.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

apiserver/plane/bgtasks/dummy_data_task.py#L501

Trailing whitespace
shuffled_labels = list(labels)

# Bulk issue
bulk_issue_labels = []
for issue in issues:
random.shuffle(shuffled_labels)
for label in random.sample(
list(labels), random.randint(0, len(labels) - 1)
shuffled_labels, random.randint(0, 5)

Check warning on line 509 in apiserver/plane/bgtasks/dummy_data_task.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

apiserver/plane/bgtasks/dummy_data_task.py#L509

Depending on the context, generating weak random numbers may expose cryptographic functions, which rely on these numbers, to be exploitable.

Check warning on line 509 in apiserver/plane/bgtasks/dummy_data_task.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

apiserver/plane/bgtasks/dummy_data_task.py#L509

Standard pseudo-random generators are not suitable for security/cryptographic purposes.
):
bulk_issue_labels.append(
IssueLabel(
Expand Down Expand Up @@ -552,25 +557,33 @@
modules = Module.objects.filter(project=project).values_list(
"id", flat=True
)
issues = random.sample(
list(
# issues = random.sample(
# list(
# Issue.objects.filter(project=project).values_list("id", flat=True)
# ),
# int(issue_count / 2),
# )
issues = list(
Issue.objects.filter(project=project).values_list("id", flat=True)
),
int(issue_count / 2),
)
)

shuffled_modules = list(modules)

# Bulk issue
bulk_module_issues = []
for issue in issues:
module = modules[random.randint(0, len(modules) - 1)]
bulk_module_issues.append(
ModuleIssue(
module_id=module,
issue_id=issue,
project=project,
workspace=workspace,
random.shuffle(shuffled_modules)
for module in random.sample(
shuffled_modules, random.randint(0, 5)

Check warning on line 577 in apiserver/plane/bgtasks/dummy_data_task.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

apiserver/plane/bgtasks/dummy_data_task.py#L577

Depending on the context, generating weak random numbers may expose cryptographic functions, which rely on these numbers, to be exploitable.

Check warning on line 577 in apiserver/plane/bgtasks/dummy_data_task.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

apiserver/plane/bgtasks/dummy_data_task.py#L577

Standard pseudo-random generators are not suitable for security/cryptographic purposes.
):
bulk_module_issues.append(
ModuleIssue(
module_id=module,
issue_id=issue,
project=project,
workspace=workspace,
)
)
)
# Issue assignees
ModuleIssue.objects.bulk_create(
bulk_module_issues, batch_size=1000, ignore_conflicts=True
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def handle(self, *args: Any, **options: Any) -> str | None:

from plane.bgtasks.dummy_data_task import create_dummy_data

create_dummy_data.delay(
create_dummy_data(
slug=workspace_slug,
email=creator,
members=members,
Expand Down
7 changes: 7 additions & 0 deletions apiserver/plane/utils/global_paginator.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# python imports
from math import ceil

# constants
PAGINATOR_MAX_LIMIT = 1000

Expand Down Expand Up @@ -36,6 +39,9 @@ def paginate(base_queryset, queryset, cursor, on_result):
total_results = base_queryset.count()
page_size = min(cursor_object.current_page_size, PAGINATOR_MAX_LIMIT)

# getting the total pages available based on the page size
total_pages = ceil(total_results / page_size)

# Calculate the start and end index for the paginated data
start_index = 0
if cursor_object.current_page > 0:
Expand Down Expand Up @@ -72,6 +78,7 @@ def paginate(base_queryset, queryset, cursor, on_result):
"next_page_results": next_page_results,
"page_count": len(paginated_data),
"total_results": total_results,
"total_pages": total_pages,
"results": paginated_data,
}

Expand Down
10 changes: 5 additions & 5 deletions apiserver/plane/utils/paginator.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def __repr__(self):
return f"<{type(self).__name__}: results={len(self.results)}>"


MAX_LIMIT = 100
MAX_LIMIT = 1000


class BadPaginationError(Exception):
Expand Down Expand Up @@ -118,7 +118,7 @@ def __init__(
self.max_offset = max_offset
self.on_results = on_results

def get_result(self, limit=100, cursor=None):
def get_result(self, limit=1000, cursor=None):
# offset is page #
# value is page limit
if cursor is None:
Expand Down Expand Up @@ -727,7 +727,7 @@ class BasePaginator:
cursor_name = "cursor"

# get the per page parameter from request
def get_per_page(self, request, default_per_page=100, max_per_page=100):
def get_per_page(self, request, default_per_page=1000, max_per_page=1000):
try:
per_page = int(request.GET.get("per_page", default_per_page))
except ValueError:
Expand All @@ -747,8 +747,8 @@ def paginate(
on_results=None,
paginator=None,
paginator_cls=OffsetPaginator,
default_per_page=100,
max_per_page=100,
default_per_page=1000,
max_per_page=1000,
cursor_cls=Cursor,
extra_stats=None,
controller=None,
Expand Down
Loading
Loading