Skip to content

Commit

Permalink
Add pagination to DID and resource queries
Browse files Browse the repository at this point in the history
  • Loading branch information
ankurdotb committed Jan 10, 2023
1 parent a132670 commit 462edc6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions proto/cheqd/did/v2/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ syntax = "proto3";
package cheqd.did.v2;

import "cheqd/did/v2/diddoc.proto";
import "cosmos/base/query/v1beta1/pagination.proto";
import "google/api/annotations.proto";

option go_package = "github.com/cheqd/cheqd-node/x/did/types";
Expand Down Expand Up @@ -44,8 +45,14 @@ message QueryDidDocVersionResponse {
message QueryGetAllDidDocVersionsMetadataRequest {
// is a DID
string id = 1;

// pagination is the PageRequest to use for pagination.
cosmos.base.query.v1beta1.PageRequest pagination = 2;
}

message QueryAllDidDocVersionsMetadataResponse {
repeated Metadata versions = 1;

// pagination is the pagination PageResponse.
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}
7 changes: 7 additions & 0 deletions proto/cheqd/resource/v2/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ syntax = "proto3";
package cheqd.resource.v2;

import "cheqd/resource/v2/resource.proto";
import "cosmos/base/query/v1beta1/pagination.proto";
import "google/api/annotations.proto";

option go_package = "github.com/cheqd/cheqd-node/x/resource/types";
Expand Down Expand Up @@ -46,8 +47,14 @@ message QueryResourceMetadataResponse {
message QueryGetCollectionResourcesRequest {
// is unique identifier a for collection
string collection_id = 1;

// pagination is the PageRequest to use for pagination.
cosmos.base.query.v1beta1.PageRequest pagination = 2;
}

message QueryCollectionResourcesResponse {
repeated Metadata resources = 1;

// pagination is the pagination PageResponse.
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}

0 comments on commit 462edc6

Please sign in to comment.