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;
99/// Represents an input object type from a GraphQL schema
1010#[ derive( Debug , PartialEq ) ]
1111pub struct GqlInput {
12+ pub description : Option < String > ,
1213 pub name : String ,
1314 pub fields : HashMap < String , GqlObjectField > ,
1415}
@@ -37,6 +38,7 @@ impl GqlInput {
3738impl :: std:: convert:: From < graphql_parser:: schema:: InputObjectType > for GqlInput {
3839 fn from ( schema_input : graphql_parser:: schema:: InputObjectType ) -> GqlInput {
3940 GqlInput {
41+ description : schema_input. description ,
4042 name : schema_input. name ,
4143 fields : schema_input
4244 . fields
@@ -58,6 +60,7 @@ impl ::std::convert::From<graphql_parser::schema::InputObjectType> for GqlInput
5860impl :: std:: convert:: From < introspection_response:: FullType > for GqlInput {
5961 fn from ( schema_input : introspection_response:: FullType ) -> GqlInput {
6062 GqlInput {
63+ description : schema_input. description ,
6164 name : schema_input. name . expect ( "unnamed input object" ) ,
6265 fields : schema_input
6366 . input_fields
@@ -91,6 +94,7 @@ mod tests {
9194 #[ test]
9295 fn gql_input_to_rust ( ) {
9396 let cat = GqlInput {
97+ description : None ,
9498 name : "Cat" . to_string ( ) ,
9599 fields : vec ! [
96100 (
You can’t perform that action at this time.
0 commit comments