File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/test/java/graphql/annotations Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 5151import static graphql .schema .GraphQLDirective .newDirective ;
5252import static graphql .schema .GraphQLSchema .newSchema ;
5353import static org .testng .Assert .assertEquals ;
54+ import static org .testng .Assert .assertNotNull ;
5455import static org .testng .Assert .assertTrue ;
5556
5657public class GraphQLDirectivesTest {
@@ -185,10 +186,9 @@ public void queryNameWithInputObject_directivesProvidedToRegistry_wiringOfInputO
185186 .validLocations (Introspection .DirectiveLocation .INPUT_FIELD_DEFINITION , Introspection .DirectiveLocation .FIELD_DEFINITION ).build ();
186187 GraphQLObjectType object = GraphQLAnnotations .object (Query5 .class , suffixDirective );
187188 GraphQLSchema schema = newSchema ().query (object ).build ();
188-
189- ExecutionResult result = GraphQL .newGraphQL (schema ).build ().execute ("query { nameWithInputObject" +
190- "(inputObject: {acoolSuffix: \" magnificent\" , b: 5}) }" );
191- assertTrue (result .getErrors ().isEmpty ());
189+ GraphQLFieldDefinition nameWithInputObject = schema .getQueryType ().getFieldDefinition ("nameWithInputObject" );
190+ GraphQLInputObjectField field = ((GraphQLInputObjectType ) nameWithInputObject .getArgument ("inputObject" ).getType ()).getField ("acoolSuffix" );
191+ assertNotNull (field );
192192 }
193193
194194 @ Test
You can’t perform that action at this time.
0 commit comments