-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b6f1a87
commit 29a09a7
Showing
5 changed files
with
183 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,5 +4,5 @@ version = "0.1.0" | |
edition = "2021" | ||
|
||
[dependencies] | ||
cynic-codegen = "3.8.0" | ||
cynic-codegen = "3.7.3" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
crates/sui-graphql-client/src/query_types/package_replay.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
// Copyright (c) Mysten Labs, Inc. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
use sui_types::types::Address; | ||
|
||
use crate::query_types::schema; | ||
use crate::query_types::Base64; | ||
use crate::query_types::PageInfo; | ||
use crate::query_types::TransactionBlock; | ||
|
||
// =========================================================================== | ||
// PackagesVersions | ||
// =========================================================================== | ||
|
||
#[derive(cynic::QueryFragment, Debug)] | ||
#[cynic( | ||
schema = "rpc", | ||
graphql_type = "Query", | ||
variables = "PackageVersionsArgs" | ||
)] | ||
pub struct PackageVersionsWithEpochDataQuery { | ||
#[arguments(address: $address, after: $after, first: $first, last: $last, before: $before, filter:$filter)] | ||
pub package_versions: MovePackageConnection, | ||
} | ||
|
||
#[derive(cynic::QueryVariables, Debug)] | ||
pub struct PackageVersionsArgs<'a> { | ||
pub address: Address, | ||
pub after: Option<&'a str>, | ||
pub first: Option<i32>, | ||
pub last: Option<i32>, | ||
pub before: Option<&'a str>, | ||
pub filter: Option<MovePackageVersionFilter>, | ||
} | ||
|
||
#[derive(cynic::InputObject, Debug)] | ||
#[cynic(schema = "rpc", graphql_type = "MovePackageVersionFilter")] | ||
pub struct MovePackageVersionFilter { | ||
pub after_version: Option<u64>, | ||
pub before_version: Option<u64>, | ||
} | ||
|
||
#[derive(cynic::QueryFragment, Debug)] | ||
#[cynic(schema = "rpc", graphql_type = "MovePackage")] | ||
pub struct MovePackage { | ||
pub version: u64, | ||
pub package_bcs: Option<Base64>, | ||
pub previous_transaction_block: Option<TransactionBlock>, | ||
} | ||
|
||
#[derive(cynic::QueryFragment, Debug)] | ||
#[cynic(schema = "rpc", graphql_type = "MovePackageConnection")] | ||
pub struct MovePackageConnection { | ||
pub nodes: Vec<MovePackage>, | ||
pub page_info: PageInfo, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters