Skip to content

Commit

Permalink
ROVER-245 Add polling_interval option
Browse files Browse the repository at this point in the history
We want to set a sensible default here (5 seconds), while giving
users the ability to override it if that becomes problematic.
  • Loading branch information
jonathanrainer committed Jan 16, 2025
1 parent 764b79b commit bab2394
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/command/lsp/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ pub struct LspOpts {
#[serde(skip_serializing)]
#[arg(long = "supergraph-config")]
supergraph_yaml: Option<Utf8PathBuf>,

/// The number of seconds to wait between polling requests to any subgraphs that
/// are being introspected for their schema
#[arg(long = "polling-interval", short = 'i', default_value = "5")]
#[serde(skip_serializing)]
introspection_polling_interval: u64,
}

impl Lsp {
Expand Down Expand Up @@ -336,7 +342,7 @@ async fn create_composition_stream(
FsWriteFile::default(),
client_config.service()?,
fetch_remote_subgraph_factory.boxed_clone(),
1,
lsp_opts.introspection_polling_interval,
Utf8PathBuf::try_from(temp_dir())?,
OutputTarget::InMemory,
true,
Expand Down

0 comments on commit bab2394

Please sign in to comment.