Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
stefan-mysten committed Jan 16, 2025
1 parent cb174b6 commit 322d14b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion crates/sui-graphql-client-build/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ version = "0.1.0"
edition = "2021"

[dependencies]
cynic-codegen = "3.8.0"
cynic-codegen = "3.7.3"

6 changes: 3 additions & 3 deletions crates/sui-graphql-client/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ impl Error {
// Private constructors

/// Convert the given error into a generic error.
pub(crate) fn from_error<E: Into<BoxError>>(kind: Kind, error: E) -> Self {
pub fn from_error<E: Into<BoxError>>(kind: Kind, error: E) -> Self {
Self {
inner: Box::new(InnerError {
kind,
Expand All @@ -74,7 +74,7 @@ impl Error {
}

/// Special constructor for queries that expect to return data but it's none.
pub(crate) fn empty_response_error() -> Self {
pub fn empty_response_error() -> Self {
Self {
inner: Box::new(InnerError {
kind: Kind::Query,
Expand All @@ -85,7 +85,7 @@ impl Error {
}

/// Create a Query kind of error with the original graphql errors.
pub(crate) fn graphql_error(errors: Vec<GraphQlError>) -> Self {
pub fn graphql_error(errors: Vec<GraphQlError>) -> Self {
Self {
inner: Box::new(InnerError {
kind: Kind::Query,
Expand Down
10 changes: 5 additions & 5 deletions crates/sui-graphql-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ impl<T> Page<T> {
&self.data
}

/// Internal function to create a new page with the provided data and page information.
fn new(page_info: PageInfo, data: Vec<T>) -> Self {
/// Create a new page with the provided data and page information.
pub fn new(page_info: PageInfo, data: Vec<T>) -> Self {
Self { page_info, data }
}

Expand All @@ -189,8 +189,8 @@ impl<T> Page<T> {
self.data.is_empty()
}

/// Internal function to create a page with no data.
fn new_empty() -> Self {
/// Create a page with no data.
pub fn new_empty() -> Self {
Self::new(PageInfo::default(), vec![])
}

Expand Down Expand Up @@ -328,7 +328,7 @@ impl Client {

/// Internal function to handle pagination filters and return the appropriate values.
/// If limit is omitted, it will use the max page size from the service config.
async fn pagination_filter(
pub async fn pagination_filter(
&self,
pagination_filter: PaginationFilter,
) -> (Option<String>, Option<String>, Option<i32>, Option<i32>) {
Expand Down
1 change: 1 addition & 0 deletions crates/sui-graphql-client/src/query_types/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ pub struct TransactionBlocksQueryArgs<'a> {
#[cynic(schema = "rpc", graphql_type = "TransactionBlock")]
pub struct TransactionBlock {
pub bcs: Option<Base64>,
pub effects: Option<TransactionBlockEffects>,
pub signatures: Option<Vec<Base64>>,
}

Expand Down

0 comments on commit 322d14b

Please sign in to comment.