File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
src/test/java/graphql/annotations Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,13 @@ public String deprecate() {
8585 @ GraphQLField
8686 private String privateTest = "private" ;
8787
88+ @ Getter
89+ @ Setter
90+ @ GraphQLNonNull
91+ @ GraphQLField
92+ @ GraphQLName ("z_nonOptionalString" )
93+ private String z ;
94+
8895 }
8996
9097 private static class TestDefaults {
@@ -128,7 +135,7 @@ public void objectClass() {
128135 public void fields () {
129136 GraphQLObjectType object = GraphQLAnnotations .object (TestObject .class );
130137 List <GraphQLFieldDefinition > fields = object .getFieldDefinitions ();
131- assertEquals (fields .size (), 7 );
138+ assertEquals (fields .size (), 8 );
132139
133140 fields .sort ((o1 , o2 ) -> o1 .getName ().compareTo (o2 .getName ()));
134141
@@ -164,6 +171,8 @@ public void fields() {
164171 assertEquals (fields .get (5 ).getDataFetcher ().getClass (), PropertyDataFetcher .class );
165172 assertEquals (fields .get (6 ).getDataFetcher ().getClass (), FieldDataFetcher .class );
166173
174+ assertEquals (fields .get (7 ).getName (), "z_nonOptionalString" );
175+ assertTrue (fields .get (7 ).getType () instanceof graphql .schema .GraphQLNonNull );
167176 }
168177
169178 private static class TestObjectInherited extends TestObject {
You can’t perform that action at this time.
0 commit comments