Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add torii index pending option #42

Merged
merged 2 commits into from
May 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -11792,6 +11792,20 @@
"name": "Int",
"ofType": null
}
},
{
"defaultValue": null,
"description": null,
"name": "indexPending",
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "Boolean",
"ofType": null
}
}
}
],
"interfaces": [],
Expand Down Expand Up @@ -33634,6 +33648,22 @@
"ofType": null
}
}
},
{
"args": [],
"deprecationReason": null,
"description": null,
"isDeprecated": false,
"name": "indexPending",
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "Boolean",
"ofType": null
}
}
}
],
"inputFields": [],
Expand Down
1 change: 1 addition & 0 deletions src/command/deployments/create.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ mutation CreateDeployment(
rpc
world
startBlock
indexPending
}
... on MadaraConfig {
rpc
Expand Down
2 changes: 2 additions & 0 deletions src/command/deployments/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ impl CreateArgs {
rpc: config.rpc.clone(),
world: format!("{:#x}", config.world),
start_block: Some(config.start_block),
index_pending: config.index_pending,
}),
}),
},
Expand Down Expand Up @@ -125,6 +126,7 @@ impl CreateArgs {
println!(" World: {}", config.world);
println!(" RPC: {}", config.rpc);
println!(" Start Block: {}", config.start_block);
println!(" Index Pending: {}", config.index_pending);
println!("\nEndpoints:");
println!(" GRAPHQL: {}", config.graphql);
println!(" GRPC: {}", config.grpc);
Expand Down
1 change: 1 addition & 0 deletions src/command/deployments/describe.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ query DescribeDeployment($project: String!, $service: DeploymentService!) {
rpc
world
startBlock
indexPending
}
... on MadaraConfig {
version
Expand Down
1 change: 1 addition & 0 deletions src/command/deployments/describe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ impl DescribeArgs {
println!(" World: {}", config.world);
println!(" RPC: {}", config.rpc);
println!(" Start Block: {}", config.start_block);
println!(" Indexing Pending: {}", config.index_pending);
println!("\nEndpoints:");
println!(" GraphQL: {}", config.graphql);
println!(" GRPC: {}", config.grpc);
Expand Down
4 changes: 4 additions & 0 deletions src/command/deployments/services/torii.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ pub struct ToriiCreateArgs {
#[arg(short, long)]
#[arg(help = "Specify a block to start indexing from.")]
pub start_block: i64,

#[arg(long)]
#[arg(help = "Enable indexing pending blocks.")]
pub index_pending: bool,
}

#[derive(Clone, Debug, Args, serde::Serialize)]
Expand Down
1 change: 1 addition & 0 deletions src/command/deployments/update.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ mutation UpdateDeployment(
rpc
world
startBlock
indexPending
}
# TODO: handle update
}
Expand Down
1 change: 1 addition & 0 deletions src/command/deployments/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ impl UpdateArgs {
println!(" World: {}", config.world);
println!(" RPC: {}", config.rpc);
println!(" Start Block: {}", config.start_block);
println!(" Index Pending: {}", config.index_pending);
println!("\nEndpoints:");
println!(" GRAPHQL: {}", config.graphql);
println!(" GRPC: {}", config.grpc);
Expand Down
Loading