@@ -186,7 +186,7 @@ public void query() {
186186 .additionalType (TestObject .class ).build ();
187187
188188 GraphQL graphQL = GraphQL .newGraphQL (schema ).build ();
189- ExecutionResult result = graphQL .execute ("{ object { value(input:{key:\" test\" }) } }" , new Query ());
189+ ExecutionResult result = graphQL .execute (GraphQLHelper . createExecutionInput ( "{ object { value(input:{key:\" test\" }) } }" , new Query () ));
190190 assertTrue (result .getErrors ().isEmpty ());
191191 assertEquals (((Map <String , Map <String , String >>) result .getData ()).get ("object" ).get ("value" ), "testa" );
192192 }
@@ -196,7 +196,7 @@ public void queryMultipleDefinitions() {
196196 GraphQLSchema schema = newAnnotationsSchema ().query (QueryMultipleDefinitions .class ).build ();
197197
198198 GraphQL graphQL = GraphQL .newGraphQL (schema ).build ();
199- ExecutionResult result = graphQL .execute ("{ something(code: {firstField:\" a\" ,secondField:\" b\" }) somethingElse(code: {firstField:\" c\" ,secondField:\" d\" }) }" , new QueryMultipleDefinitions ());
199+ ExecutionResult result = graphQL .execute (GraphQLHelper . createExecutionInput ( "{ something(code: {firstField:\" a\" ,secondField:\" b\" }) somethingElse(code: {firstField:\" c\" ,secondField:\" d\" }) }" , new QueryMultipleDefinitions () ));
200200 assertTrue (result .getErrors ().isEmpty ());
201201 assertEquals (((Map <String , String >) result .getData ()).get ("something" ), "ab" );
202202 assertEquals (((Map <String , String >) result .getData ()).get ("somethingElse" ), "cd" );
@@ -207,11 +207,11 @@ public void queryWithRecursion() {
207207 GraphQLSchema schema = newAnnotationsSchema ().query (QueryRecursion .class ).build ();
208208
209209 GraphQL graphQL = GraphQL .newGraphQL (schema ).build ();
210- ExecutionResult result = graphQL .execute ("{ object { value(input:{key:\" test\" }) } }" , new QueryRecursion ());
210+ ExecutionResult result = graphQL .execute (GraphQLHelper . createExecutionInput ( "{ object { value(input:{key:\" test\" }) } }" , new QueryRecursion () ));
211211 assertTrue (result .getErrors ().isEmpty ());
212212 assertEquals (((Map <String , Map <String , String >>) result .getData ()).get ("object" ).get ("value" ), "testa" );
213213
214- result = graphQL .execute ("{ object { value(input:{rec:{key:\" test\" }}) } }" , new QueryRecursion ());
214+ result = graphQL .execute (GraphQLHelper . createExecutionInput ( "{ object { value(input:{rec:{key:\" test\" }}) } }" , new QueryRecursion () ));
215215 assertTrue (result .getErrors ().isEmpty ());
216216 assertEquals (((Map <String , Map <String , String >>) result .getData ()).get ("object" ).get ("value" ), "rectesta" );
217217 }
@@ -221,7 +221,7 @@ public void queryWithList() {
221221 GraphQLSchema schema = newAnnotationsSchema ().query (QueryList .class ).build ();
222222
223223 GraphQL graphQL = GraphQL .newGraphQL (schema ).build ();
224- ExecutionResult result = graphQL .execute ("{ object { value(input:[[[{key:\" test\" , complex:[{subKey:\" subtest\" },{subKey:\" subtest2\" }]}]]]) } }" , new QueryList ());
224+ ExecutionResult result = graphQL .execute (GraphQLHelper . createExecutionInput ( "{ object { value(input:[[[{key:\" test\" , complex:[{subKey:\" subtest\" },{subKey:\" subtest2\" }]}]]]) } }" , new QueryList () ));
225225 assertEquals (((Map <String , Map <String , String >>) result .getData ()).get ("object" ).get ("value" ), "test-subtest" );
226226 }
227227
@@ -230,7 +230,7 @@ public void queryWithInterface() {
230230 GraphQLSchema schema = newAnnotationsSchema ().query (QueryIface .class ).additionalType (TestObject .class ).build ();
231231
232232 GraphQL graphQL = GraphQL .newGraphQL (schema ).build ();
233- ExecutionResult result = graphQL .execute ("{ iface { value(input:{key:\" test\" }) } }" , new QueryIface ());
233+ ExecutionResult result = graphQL .execute (GraphQLHelper . createExecutionInput ( "{ iface { value(input:{key:\" test\" }) } }" , new QueryIface () ));
234234 assertTrue (result .getErrors ().isEmpty ());
235235 assertEquals (((Map <String , Map <String , String >>) result .getData ()).get ("iface" ).get ("value" ), "testa" );
236236 }
0 commit comments