Skip to content

Commit

Permalink
feat: consolidate subgraph config structs
Browse files Browse the repository at this point in the history
  • Loading branch information
Jannis committed Dec 1, 2023
1 parent 9e8364b commit 7316827
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
13 changes: 3 additions & 10 deletions common/src/indexer_service/http/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,7 @@ pub struct DatabaseConfig {
}

#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct NetworkSubgraphConfig {
pub deployment: Option<DeploymentId>,
pub query_url: String,
pub syncing_interval: u64,
}

#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct EscrowSubgraphConfig {
pub struct SubgraphConfig {
pub deployment: Option<DeploymentId>,
pub query_url: String,
pub syncing_interval: u64,
Expand All @@ -40,8 +33,8 @@ pub struct IndexerServiceConfig {
pub server: ServerConfig,
pub database: DatabaseConfig,
pub graph_node: Option<GraphNodeConfig>,
pub network_subgraph: NetworkSubgraphConfig,
pub escrow_subgraph: EscrowSubgraphConfig,
pub network_subgraph: SubgraphConfig,
pub escrow_subgraph: SubgraphConfig,
pub graph_network: GraphNetworkConfig,
}

Expand Down
4 changes: 2 additions & 2 deletions common/src/indexer_service/http/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ mod request_handler;
mod scalar_receipt_header;

pub use config::{
DatabaseConfig, EscrowSubgraphConfig, GraphNetworkConfig, IndexerConfig, IndexerServiceConfig,
NetworkSubgraphConfig, ServerConfig,
DatabaseConfig, GraphNetworkConfig, IndexerConfig, IndexerServiceConfig, ServerConfig,
SubgraphConfig,
};
pub use indexer_service::{
IndexerService, IndexerServiceImpl, IndexerServiceOptions, IndexerServiceRelease, IsAttestable,
Expand Down

0 comments on commit 7316827

Please sign in to comment.