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

Remove hard-coded limits to make them configurable in SpiceDB #99

Merged
merged 1 commit into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion authzed/api/v1/experimental_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ message BulkExportRelationshipsRequest {
// relationships the server can return in one page. By default, the server
// will pick a page size, and the server is free to choose a smaller size
// at will.
uint32 optional_limit = 2 [(validate.rules).uint32 = {gte:0, lte: 10000}];
uint32 optional_limit = 2 [(validate.rules).uint32 = {gte:0}];

// optional_cursor, if specified, indicates the cursor after which results
// should resume being returned. The cursor can be found on the
Expand Down
8 changes: 4 additions & 4 deletions authzed/api/v1/permission_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ message ReadRelationshipsRequest {
// before the stream is closed on the server side. By default, the stream will continue
// resolving relationships until exhausted or the stream is closed due to the client or a
// network issue.
uint32 optional_limit = 3 [(validate.rules).uint32 = {gte:0, lte: 1000}];
uint32 optional_limit = 3 [(validate.rules).uint32 = {gte:0}];

// optional_cursor, if specified, indicates the cursor after which results should resume being returned.
// The cursor can be found on the ReadRelationshipsResponse object.
Expand Down Expand Up @@ -286,7 +286,7 @@ message DeleteRelationshipsRequest {
// the deletion call will fail with an error to prevent partial deletion. If partial deletion
// is needed, specify below that partial deletion is allowed. Partial deletions can be used
// in a loop to delete large amounts of relationships in a *non-transactional* manner.
uint32 optional_limit = 3 [(validate.rules).uint32 = {gte:0, lte: 1000}];
uint32 optional_limit = 3 [(validate.rules).uint32 = {gte:0}];

// optional_allow_partial_deletions, if true and a limit is specified, will delete matching found
// relationships up to the count specified in optional_limit, and no more.
Expand Down Expand Up @@ -473,7 +473,7 @@ message LookupResourcesRequest {
// before the stream is closed on the server side. By default, the stream will continue
// resolving resources until exhausted or the stream is closed due to the client or a
// network issue.
uint32 optional_limit = 6 [(validate.rules).uint32 = {gte:0, lte: 1000}];
uint32 optional_limit = 6 [(validate.rules).uint32 = {gte:0}];

// optional_cursor, if specified, indicates the cursor after which results should resume being returned.
// The cursor can be found on the LookupResourcesResponse object.
Expand Down Expand Up @@ -566,7 +566,7 @@ message LookupSubjectsRequest {
// for each invocation of the API.
//
// ***IT IS UP TO THE CALLER IN THIS CASE TO COMBINE THE EXCLUSIONS IF DESIRED***
uint32 optional_concrete_limit = 7 [(validate.rules).uint32 = {gte:0, lte: 1000}];
uint32 optional_concrete_limit = 7 [(validate.rules).uint32 = {gte:0}];

// optional_cursor, if specified, indicates the cursor after which results should resume being returned.
// The cursor can be found on the LookupSubjectsResponse object.
Expand Down
Loading