@@ -3,7 +3,7 @@ mod satisfiability;
3
3
use std:: vec;
4
4
5
5
pub use crate :: composition:: satisfiability:: validate_satisfiability;
6
- use crate :: error:: SingleCompositionError ;
6
+ use crate :: error:: CompositionError ;
7
7
pub use crate :: schema:: schema_upgrader:: upgrade_subgraphs_if_necessary;
8
8
use crate :: subgraph:: typestate:: Expanded ;
9
9
use crate :: subgraph:: typestate:: Initial ;
@@ -16,7 +16,7 @@ pub use crate::supergraph::Supergraph;
16
16
17
17
pub fn compose (
18
18
subgraphs : Vec < Subgraph < Initial > > ,
19
- ) -> Result < Supergraph < Satisfiable > , Vec < SingleCompositionError > > {
19
+ ) -> Result < Supergraph < Satisfiable > , Vec < CompositionError > > {
20
20
let expanded_subgraphs = expand_subgraphs ( subgraphs) ?;
21
21
let upgraded_subgraphs = upgrade_subgraphs_if_necessary ( expanded_subgraphs) ?;
22
22
let validated_subgraphs = validate_subgraphs ( upgraded_subgraphs) ?;
@@ -31,8 +31,8 @@ pub fn compose(
31
31
/// `@link`). This function will update subgraph schemas with all missing federation definitions.
32
32
pub fn expand_subgraphs (
33
33
subgraphs : Vec < Subgraph < Initial > > ,
34
- ) -> Result < Vec < Subgraph < Expanded > > , Vec < SingleCompositionError > > {
35
- let mut errors: Vec < SingleCompositionError > = vec ! [ ] ;
34
+ ) -> Result < Vec < Subgraph < Expanded > > , Vec < CompositionError > > {
35
+ let mut errors: Vec < CompositionError > = vec ! [ ] ;
36
36
let expanded: Vec < Subgraph < Expanded > > = subgraphs
37
37
. into_iter ( )
38
38
. map ( |s| s. expand_links ( ) )
@@ -49,8 +49,8 @@ pub fn expand_subgraphs(
49
49
/// `@key` specifies valid `FieldSet`s etc).
50
50
pub fn validate_subgraphs (
51
51
subgraphs : Vec < Subgraph < Upgraded > > ,
52
- ) -> Result < Vec < Subgraph < Validated > > , Vec < SingleCompositionError > > {
53
- let mut errors: Vec < SingleCompositionError > = vec ! [ ] ;
52
+ ) -> Result < Vec < Subgraph < Validated > > , Vec < CompositionError > > {
53
+ let mut errors: Vec < CompositionError > = vec ! [ ] ;
54
54
let validated: Vec < Subgraph < Validated > > = subgraphs
55
55
. into_iter ( )
56
56
. map ( |s| s. validate ( ) )
@@ -66,18 +66,18 @@ pub fn validate_subgraphs(
66
66
/// Perform validations that require information about all available subgraphs.
67
67
pub fn pre_merge_validations (
68
68
_subgraphs : & [ Subgraph < Validated > ] ,
69
- ) -> Result < ( ) , Vec < SingleCompositionError > > {
69
+ ) -> Result < ( ) , Vec < CompositionError > > {
70
70
panic ! ( "pre_merge_validations is not implemented yet" )
71
71
}
72
72
73
73
pub fn merge_subgraphs (
74
74
_subgraphs : Vec < Subgraph < Validated > > ,
75
- ) -> Result < Supergraph < Merged > , Vec < SingleCompositionError > > {
75
+ ) -> Result < Supergraph < Merged > , Vec < CompositionError > > {
76
76
panic ! ( "merge_subgraphs is not implemented yet" )
77
77
}
78
78
79
79
pub fn post_merge_validations (
80
80
_supergraph : & Supergraph < Merged > ,
81
- ) -> Result < ( ) , Vec < SingleCompositionError > > {
81
+ ) -> Result < ( ) , Vec < CompositionError > > {
82
82
panic ! ( "post_merge_validations is not implemented yet" )
83
83
}
0 commit comments