@@ -10,23 +10,24 @@ use scalars::Scalar;
1010use std:: collections:: { BTreeMap , BTreeSet } ;
1111use unions:: GqlUnion ;
1212
13- pub const DEFAULT_SCALARS : & [ & str ] = & [ "ID" , "String" , "Int" , "Float" , "Boolean" ] ;
13+ pub ( crate ) const DEFAULT_SCALARS : & [ & str ] = & [ "ID" , "String" , "Int" , "Float" , "Boolean" ] ;
1414
15+ /// Intermediate representation for a parsed GraphQL schema used during code generation.
1516#[ derive( Debug , Clone , PartialEq ) ]
1617pub 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 > ,
2627}
2728
2829impl Schema {
29- pub fn new ( ) -> Schema {
30+ pub ( crate ) fn new ( ) -> Schema {
3031 Schema {
3132 enums : BTreeMap :: new ( ) ,
3233 inputs : BTreeMap :: new ( ) ,
@@ -40,7 +41,7 @@ impl Schema {
4041 }
4142 }
4243
43- pub fn ingest_interface_implementations (
44+ pub ( crate ) fn ingest_interface_implementations (
4445 & mut self ,
4546 impls : BTreeMap < String , Vec < String > > ,
4647 ) -> Result < ( ) , failure:: Error > {
0 commit comments