We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0260db4 commit 344fad3Copy full SHA for 344fad3
graph/src/data/subgraph/mod.rs
@@ -719,6 +719,23 @@ impl<C: Blockchain> UnvalidatedSubgraphManifest<C> {
719
));
720
}
721
722
+ // Check for duplicate source subgraphs
723
+ let mut seen_sources = std::collections::HashSet::new();
724
+ for ds in data_sources.iter() {
725
+ if let DataSource::Subgraph(ds) = ds {
726
+ let source_id = ds.source.address();
727
+ if !seen_sources.insert(source_id.clone()) {
728
+ errors.push(SubgraphManifestValidationError::DataSourceValidation(
729
+ "subgraph".to_string(),
730
+ anyhow!(
731
+ "Multiple subgraph datasources cannot use the same source subgraph {}",
732
+ source_id
733
+ ),
734
+ ));
735
+ }
736
737
738
+
739
errors
740
741
0 commit comments