-
Notifications
You must be signed in to change notification settings - Fork 3k
Open
Labels
area/grpcgRPCgRPCkind/enhancementNew feature or requestNew feature or requesttriage/needs-feedbackWe are waiting for feedback.We are waiting for feedback.
Description
Description
Quarkus gRPC currently leaves the implementation of filtering and pagination entirely to the user. However, these features are common requirements in almost any real-world gRPC-based API, and there are well-established conventions and standards for them, such as:
- Standardized filtering: AIP 160 - Filtering
- Standardized pagination: AIP 158 - Pagination
Proposal
It would be extremely valuable for Quarkus to provide built-in support for filtering and pagination in gRPC services, ideally by:
- Supplying proto definitions for standard request fields (
page_size
,page_token
,Filter filter
etc.) - Offering composable protobuf messages implementing AIP 158/160 conventions, e.g. a standard
Filter
message. - Providing Java (and ideally Panache/JPA/Hibernate-integrated) helpers for parsing the standard filter expression language (like that described in AIP 160).
- Framework-level support or code-generation for mapping filter expressions into database queries in a secure, idiomatic way.
A sample message following AIP-160 for filtering and AIP-158 for pagination:
message ListWidgetsRequest {
int32 page_size = 1;
string page_token = 2;
string filter = 3; // AIP-160 style filter
}
Or, with a helper Filter message:
message ListWidgetsRequest {
int32 page_size = 1;
string page_token = 2;
Filter filter = 3;
}
Implementation ideas
For Filter it can be standard implementation, something like this:
message Filter {
oneof filter {
Or or = 1;
And and = 2;
Not not = 3;
}
}
message Or {
repeated Filter operands = 1;
}
axidex
Metadata
Metadata
Assignees
Labels
area/grpcgRPCgRPCkind/enhancementNew feature or requestNew feature or requesttriage/needs-feedbackWe are waiting for feedback.We are waiting for feedback.