@@ -0,0 +1,2904 @@
+package graphql.validation.rules;%0Aimport static graphql.Scalars.GraphQLString;%0Aimport static graphql.schema.GraphQLArgument.newArgument;%0Aimport static graphql.schema.GraphQLFieldDefinition.newFieldDefinition;%0Aimport static graphql.schema.GraphQLObjectType.newObject;%0Aimport static org.junit.Assert.assertEquals;%0A%0Aimport java.util.HashMap;%0Aimport java.util.Map;%0A%0Aimport org.junit.Test;%0A%0Aimport graphql.ExecutionResult;%0Aimport graphql.GraphQL;%0Aimport graphql.schema.GraphQLNonNull;%0Aimport graphql.schema.GraphQLObjectType;%0Aimport graphql.schema.GraphQLSchema;%0A%0Apublic class VariableTypeMismatchTest %7B%0A%0A    @Test%0A    public void testNotNull() %7B%0A        GraphQLObjectType queryType = newObject().name(%22helloWorldQuery%22)%0A                                                 .field(newFieldDefinition().type(GraphQLString)%0A                                                                            .name(%22hello%22)%0A                                                                            .argument(newArgument().name(%22id%22)%0A                                                                                                   .type(new GraphQLNonNull(GraphQLString))%0A                                                                                                   .build())%0A                                                                            .argument(newArgument().name(%22name%22)%0A                                                                                                   .type(GraphQLString)%0A                                                                                                   .build())%0A                                                                            .staticValue(%22world%22)%0A                                                                            .build())%0A                                                 .build();%0A%0A        GraphQLSchema schema = GraphQLSchema.newSchema()%0A                                            .query(queryType)%0A                                            .build();%0A%0A        // This works%0A        Map%3CString, Object%3E arguments = new HashMap%3C%3E();%0A        arguments.put(%22name%22, %22foo%22);%0A        ExecutionResult result = new GraphQL(schema).execute(%22query m($name : String) %7Bhello(id: %5C%22foo%5C%22, name: $name) %7D%22);%0A%0A        assertEquals(result.getErrors()%0A                           .toString(),%0A                     0, result.getErrors()%0A                              .size());%0A%0A        // This fails%0A        arguments = new HashMap%3C%3E();%0A        arguments.put(%22id%22, %22foo%22);%0A        result = new GraphQL(schema).execute(%22query m($id : String) %7Bhello(id: $id) %7D%22,%0A                                             (Object) null, arguments);%0A%0A        assertEquals(result.getErrors()%0A                           .toString(),%0A                     0, result.getErrors()%0A                              .size());%0A%0A        System.out.println(result.getData());%0A    %7D%0A%7D%0A

Add test for graphql bug on non null input arguments