Skip to content

Commit

Permalink
Pull schema and add polling-interval to torii
Browse files Browse the repository at this point in the history
  • Loading branch information
steebchen committed Aug 27, 2024
1 parent 1ecde30 commit f9abc5a
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 12 deletions.
3 changes: 2 additions & 1 deletion cli/src/command/deployments/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ impl CreateArgs {
world: format!("{:#x}", config.world),
start_block: Some(config.start_block.unwrap_or(0)),
index_pending: config.index_pending,
polling_interval: config.polling_interval,
}),
}),
},
Expand Down Expand Up @@ -126,7 +127,7 @@ impl CreateArgs {
println!("\nConfiguration:");
println!(" World: {}", config.world);
println!(" RPC: {}", config.rpc);
println!(" Start Block: {}", config.start_block);
println!(" Start Block: {}", config.start_block.unwrap_or(0));
println!(" Index Pending: {}", config.index_pending.unwrap_or(false));
println!("\nEndpoints:");
println!(" GRAPHQL: {}", config.graphql);
Expand Down
2 changes: 1 addition & 1 deletion cli/src/command/deployments/describe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ impl DescribeArgs {
println!(" Version: {}", config.version);
println!(" World: {}", config.world);
println!(" RPC: {}", config.rpc);
println!(" Start Block: {}", config.start_block);
println!(" Start Block: {}", config.start_block.unwrap_or(0));
println!(
" Indexing Pending: {}",
config.index_pending.unwrap_or(false)
Expand Down
6 changes: 5 additions & 1 deletion cli/src/command/deployments/services/torii.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,15 @@ pub struct ToriiCreateArgs {

#[arg(short, long)]
#[arg(help = "Specify a block to start indexing from.")]
pub start_block: Option<i64>,
pub start_block: Option<u64>,

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

#[arg(long)]
#[arg(help = "Polling interval in milliseconds.")]
pub polling_interval: Option<u64>,
}

#[derive(Clone, Debug, Args, serde::Serialize)]
Expand Down
2 changes: 1 addition & 1 deletion cli/src/command/deployments/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ impl UpdateArgs {
println!("\nConfiguration:");
println!(" World: {}", config.world);
println!(" RPC: {}", config.rpc);
println!(" Start Block: {}", config.start_block);
println!(" Start Block: {}", config.start_block.unwrap_or(0));
println!(" Index Pending: {}", config.index_pending.unwrap_or(false));
println!("\nEndpoints:");
println!(" GRAPHQL: {}", config.graphql);
Expand Down
34 changes: 26 additions & 8 deletions slot/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -11943,7 +11943,7 @@
"name": "startBlock",
"type": {
"kind": "SCALAR",
"name": "Int",
"name": "Long",
"ofType": null
}
},
Expand All @@ -11956,6 +11956,16 @@
"name": "Boolean",
"ofType": null
}
},
{
"defaultValue": null,
"description": null,
"name": "pollingInterval",
"type": {
"kind": "SCALAR",
"name": "Long",
"ofType": null
}
}
],
"interfaces": [],
Expand Down Expand Up @@ -35002,13 +35012,9 @@
"isDeprecated": false,
"name": "startBlock",
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "Long",
"ofType": null
}
"kind": "SCALAR",
"name": "Long",
"ofType": null
}
},
{
Expand All @@ -35022,6 +35028,18 @@
"name": "Boolean",
"ofType": null
}
},
{
"args": [],
"deprecationReason": null,
"description": null,
"isDeprecated": false,
"name": "pollingInterval",
"type": {
"kind": "SCALAR",
"name": "Long",
"ofType": null
}
}
],
"inputFields": [],
Expand Down

0 comments on commit f9abc5a

Please sign in to comment.