 
 func defineInputObjectFieldMap(
     name: String,
-    fields: InputObjectConfigFieldMap
-) throws -> InputObjectFieldMap {
+    fields: InputObjectFieldMap
+) throws -> InputObjectFieldDefinitionMap {
     guard !fields.isEmpty else {
         throw GraphQLError(
             message:
-            "\(name) fields must be an object with field names as keys or a " +
-            "function which returns such an object."
+            "\(name) fields must be an object with field names as " +
+            "keys or a function which returns such an object."
         )
     }
 
-    var resultFieldMap = InputObjectFieldMap()
-
-    for (fieldName, field) in fields {
-        try assertValid(name: fieldName)
-
-        let newField = InputObjectFieldDefinition(
-            name: fieldName,
+    var definitionMap = InputObjectFieldDefinitionMap()
+
+    for (name, field) in fields {
+        try assertValid(name: name)
+
+        let definition = InputObjectFieldDefinition(
+            name: name,
+            type: field.type,
             description: field.description,
-            type: field.type,
             defaultValue: field.defaultValue
         )
 
-        resultFieldMap[fieldName] = newField
-    }
-
-    return resultFieldMap
+        definitionMap[name] = definition
+    }
+
+    return definitionMap
 }
 
 public struct InputObjectField {

    }
}

public typealias InputObjectConfigFieldMap = [String: InputObjectField]

public struct InputObjectFieldDefinition {
    public let name: String
    public let description: String?
    public let type: GraphQLInputType
    public let defaultValue: String?
}

extension InputObjectFieldDefinition : Encodable {

public final class GraphQLInputObjectType {
    public let name: String
    public let description: String?
    public let fields: InputObjectFieldDefinitionMap
    public let kind: TypeKind = .inputObject

    public init(
        name: String,
        description: String? = nil,
        fields: InputObjectFieldMap = [:]
    ) throws {
        try assertValid(name: name)
        self.name = name
