Skip to content

Conversation

THE-BRAHMA
Copy link

@THE-BRAHMA THE-BRAHMA commented Sep 5, 2025

🚀 Feature: Add Bulk Resource ID Support to RelationshipFilter

Summary

This PR adds support for bulk operations in RelationshipFilter by introducing a new optional_resource_ids field that allows filtering relationships by multiple resource IDs in a single request.

Github Issue: authzed/spicedb#2160

Changes

  • Added optional_resource_ids field (field 6) to RelationshipFilter message
  • Type: repeated string for bulk operations
  • Validation: Up to 100 resource IDs with pattern validation
  • Performance: Enables efficient SQL IN clause queries

Technical Details

repeated string optional_resource_ids = 6 [(validate.rules).repeated = {
  max_items: 100,
  items: {
    string: {
      pattern: "^([a-zA-Z0-9/_|\\-=+]{1,})?$"
      max_bytes: 1024
    }
  }
}];

Usage

This field cannot be used simultaneously with optional_resource_id or optional_resource_id_prefix to maintain clear filtering semantics.

Breaking Changes

None - this is a purely additive change.

Testing

  • Proto compilation successful
  • Validation rules working correctly
  • Backward compatibility maintained

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant