Skip to content

Commit

Permalink
Merge pull request #99 from josephschorr/remove-hard-limits
Browse files Browse the repository at this point in the history
Remove hard-coded limits to make them configurable in SpiceDB
  • Loading branch information
josephschorr authored Apr 18, 2024
2 parents 895d1dd + 41697b7 commit d12b0c6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
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

0 comments on commit d12b0c6

Please sign in to comment.