File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
tests/GraphQL.Client.Serializer.Tests/TestData Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -99,6 +99,21 @@ public IEnumerator<object[]> GetEnumerator()
9999 }
100100 } )
101101 } ;
102+
103+ // add test for github issue #230 : https://github.com/graphql-dotnet/graphql-client/issues/230
104+ yield return new object [ ] {
105+ "{\" data\" :{\" getMyModelType\" :{\" id\" :\" foo\" ,\" title\" :\" The best Foo movie!\" }}}" ,
106+ new GraphQLResponse < GetMyModelTypeResponse > {
107+ Data = new GetMyModelTypeResponse
108+ {
109+ getMyModelType = new Movie
110+ {
111+ id = "foo" ,
112+ title = "The best Foo movie!"
113+ }
114+ } ,
115+ }
116+ } ;
102117 }
103118
104119 IEnumerator IEnumerable . GetEnumerator ( ) => GetEnumerator ( ) ;
@@ -112,4 +127,16 @@ public class Friend
112127 public string Id { get ; set ; }
113128 public string ? Name { get ; set ; }
114129 }
130+
131+ public class GetMyModelTypeResponse
132+ {
133+ //--- Properties ---
134+ public Movie getMyModelType { get ; set ; }
135+ }
136+ public class Movie
137+ {
138+ //--- Properties ---
139+ public string id { get ; set ; }
140+ public string title { get ; set ; }
141+ }
115142}
You can’t perform that action at this time.
0 commit comments