@@ -10,23 +10,24 @@ use scalars::Scalar;
10
10
use std:: collections:: { BTreeMap , BTreeSet } ;
11
11
use unions:: GqlUnion ;
12
12
13
- pub const DEFAULT_SCALARS : & [ & str ] = & [ "ID" , "String" , "Int" , "Float" , "Boolean" ] ;
13
+ pub ( crate ) const DEFAULT_SCALARS : & [ & str ] = & [ "ID" , "String" , "Int" , "Float" , "Boolean" ] ;
14
14
15
+ /// Intermediate representation for a parsed GraphQL schema used during code generation.
15
16
#[ derive( Debug , Clone , PartialEq ) ]
16
17
pub struct Schema {
17
- pub enums : BTreeMap < String , GqlEnum > ,
18
- pub inputs : BTreeMap < String , GqlInput > ,
19
- pub interfaces : BTreeMap < String , GqlInterface > ,
20
- pub objects : BTreeMap < String , GqlObject > ,
21
- pub scalars : BTreeMap < String , Scalar > ,
22
- pub unions : BTreeMap < String , GqlUnion > ,
23
- pub query_type : Option < String > ,
24
- pub mutation_type : Option < String > ,
25
- pub subscription_type : Option < String > ,
18
+ pub ( crate ) enums : BTreeMap < String , GqlEnum > ,
19
+ pub ( crate ) inputs : BTreeMap < String , GqlInput > ,
20
+ pub ( crate ) interfaces : BTreeMap < String , GqlInterface > ,
21
+ pub ( crate ) objects : BTreeMap < String , GqlObject > ,
22
+ pub ( crate ) scalars : BTreeMap < String , Scalar > ,
23
+ pub ( crate ) unions : BTreeMap < String , GqlUnion > ,
24
+ pub ( crate ) query_type : Option < String > ,
25
+ pub ( crate ) mutation_type : Option < String > ,
26
+ pub ( crate ) subscription_type : Option < String > ,
26
27
}
27
28
28
29
impl Schema {
29
- pub fn new ( ) -> Schema {
30
+ pub ( crate ) fn new ( ) -> Schema {
30
31
Schema {
31
32
enums : BTreeMap :: new ( ) ,
32
33
inputs : BTreeMap :: new ( ) ,
@@ -40,7 +41,7 @@ impl Schema {
40
41
}
41
42
}
42
43
43
- pub fn ingest_interface_implementations (
44
+ pub ( crate ) fn ingest_interface_implementations (
44
45
& mut self ,
45
46
impls : BTreeMap < String , Vec < String > > ,
46
47
) -> Result < ( ) , failure:: Error > {
0 commit comments