Skip to content

Commit 9f498fa

Browse files
sportlabsMikepaulofaria
authored andcommitted
Expose initialisers of GraphQLInputObjectType and InputObjectField as public (#23)
1 parent 4f4ab62 commit 9f498fa

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Sources/GraphQL/Type/Definition.swift

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -973,7 +973,7 @@ public final class GraphQLInputObjectType {
973973

974974
public let fields: InputObjectFieldMap
975975

976-
init(
976+
public init(
977977
name: String,
978978
description: String? = nil,
979979
fields: InputObjectConfigFieldMap
@@ -1049,6 +1049,12 @@ public struct InputObjectField {
10491049
public let type: GraphQLInputType
10501050
public let defaultValue: Map?
10511051
public let description: String?
1052+
1053+
public init(type: GraphQLInputType, defaultValue: Map? = nil, description: String? = nil) {
1054+
self.type = type
1055+
self.defaultValue = defaultValue
1056+
self.description = description
1057+
}
10521058
}
10531059

10541060
public typealias InputObjectConfigFieldMap = [String: InputObjectField]

0 commit comments

Comments
 (0)