Source:
private GraphQLInputType buildInputObjectStub(Class<?> clazz) { log.debug("Building input object for {}", clazz.getName()); String entityName = dictionary.getJsonAliasFor(clazz); MutableGraphQLInputObjectType.Builder builder = MutableGraphQLInputObjectType.newMutableInputObject(); builder.name(entityName + ARGUMENT_INPUT); String id = dictionary.getIdFieldName(clazz); builder.field(newInputObjectField() .name(id) .type(Scalars.GraphQLID)); for (String attribute : dictionary.getAttributes(clazz)) { Class<?> attributeClass = dictionary.getType(clazz, attribute); if (excludedEntities.contains(attributeClass)) { continue; } log.debug("Building input attribute for entity {}", attribute, attributeClass.getName(), clazz.getName()); GraphQLInputType attributeType = generator.attributeToInputObject(clazz, attributeClass, attribute); if (attributeType instanceof GraphQLInputObjectType) { String objectName = attributeType.getName() + ARGUMENT_INPUT; if (!convertedInputs.containsKey(objectName)) { MutableGraphQLInputObjectType wrappedType = new MutableGraphQLInputObjectType( entityName + "__" + attributeType.getName() + ARGUMENT_INPUT, ((GraphQLInputObjectType) attributeType).getDescription(), ((GraphQLInputObjectType) attributeType).getFields() ); convertedInputs.put(objectName, wrappedType); attributeType = wrappedType; } else { attributeType = convertedInputs.get(objectName); } } else { String attributeTypeName = attributeType.getName(); convertedInputs.putIfAbsent(attributeTypeName, attributeType); attributeType = convertedInputs.get(attributeTypeName); } builder.field(newInputObjectField() .name(attribute) .type(attributeType) ); } MutableGraphQLInputObjectType constructed = builder.build(); inputObjectRegistry.put(clazz, constructed); return constructed; }

Target:
private GraphQLInputType buildInputObjectStub(Class<?> clazz) { log.debug("Building input object for {}", clazz.getName()); String entityName = dictionary.getJsonAliasFor(clazz); MutableGraphQLInputObjectType.Builder builder = MutableGraphQLInputObjectType.newMutableInputObject(); builder.name(entityName + ARGUMENT_INPUT); String id = dictionary.getIdFieldName(clazz); builder.field(newInputObjectField() .name(id) .type(Scalars.GraphQLID)); for (String attribute : dictionary.getAttributes(clazz)) { Class<?> attributeClass = dictionary.getType(clazz, attribute); if (excludedEntities.contains(attributeClass)) { continue; } log.debug("Building input attribute for entity {}", attribute, attributeClass.getName(), clazz.getName()); GraphQLInputType attributeType = generator.attributeToInputObject(clazz, attributeClass, attribute); if (attributeType instanceof GraphQLInputObjectType) { String objectName = attributeType.getName() + ARGUMENT_INPUT; if (!convertedInputs.containsKey(objectName)) { MutableGraphQLInputObjectType wrappedType = new MutableGraphQLInputObjectType( objectName, ((GraphQLInputObjectType) attributeType).getDescription(), ((GraphQLInputObjectType) attributeType).getFields() ); convertedInputs.put(objectName, wrappedType); attributeType = wrappedType; } else { attributeType = convertedInputs.get(objectName); } } else { String attributeTypeName = attributeType.getName(); convertedInputs.putIfAbsent(attributeTypeName, attributeType); attributeType = convertedInputs.get(attributeTypeName); } builder.field(newInputObjectField() .name(attribute) .type(attributeType) ); } MutableGraphQLInputObjectType constructed = builder.build(); inputObjectRegistry.put(clazz, constructed); return constructed; }