File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ use std::collections::HashMap;
9
9
/// Represents an input object type from a GraphQL schema
10
10
#[ derive( Debug , PartialEq ) ]
11
11
pub struct GqlInput {
12
+ pub description : Option < String > ,
12
13
pub name : String ,
13
14
pub fields : HashMap < String , GqlObjectField > ,
14
15
}
@@ -37,6 +38,7 @@ impl GqlInput {
37
38
impl :: std:: convert:: From < graphql_parser:: schema:: InputObjectType > for GqlInput {
38
39
fn from ( schema_input : graphql_parser:: schema:: InputObjectType ) -> GqlInput {
39
40
GqlInput {
41
+ description : schema_input. description ,
40
42
name : schema_input. name ,
41
43
fields : schema_input
42
44
. fields
@@ -58,6 +60,7 @@ impl ::std::convert::From<graphql_parser::schema::InputObjectType> for GqlInput
58
60
impl :: std:: convert:: From < introspection_response:: FullType > for GqlInput {
59
61
fn from ( schema_input : introspection_response:: FullType ) -> GqlInput {
60
62
GqlInput {
63
+ description : schema_input. description ,
61
64
name : schema_input. name . expect ( "unnamed input object" ) ,
62
65
fields : schema_input
63
66
. input_fields
@@ -91,6 +94,7 @@ mod tests {
91
94
#[ test]
92
95
fn gql_input_to_rust ( ) {
93
96
let cat = GqlInput {
97
+ description : None ,
94
98
name : "Cat" . to_string ( ) ,
95
99
fields : vec ! [
96
100
(
You can’t perform that action at this time.
0 commit comments