Skip to content

Commit 319a56e

Browse files
Merge pull request #28 from cameroncooke/patch-1
Update Graphiti+Enum.swift to add missing `name` argument
2 parents 8179cae + a143209 commit 319a56e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/GraphQLKit/Graphiti+Enum.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ extension Enum where EnumType: CaseIterable & Encodable & RawRepresentable {
44
// Initialize an enum type from a `CaseIterable` enum.
55
public convenience init(
66
_ type: EnumType.Type,
7-
name: String? = nil
7+
as name: String? = nil
88
) {
9-
self.init(type) { () -> [Graphiti.Value<EnumType>] in
9+
self.init(type, as: name) { () -> [Graphiti.Value<EnumType>] in
1010
return EnumType.allCases.map({ Value($0) })
1111
}
1212
}

0 commit comments

Comments
 (0)