Skip to content

Commit

Permalink
Update Graphiti+Enum.swift
Browse files Browse the repository at this point in the history
Add missing `name` parameter to enum convenience initializer
  • Loading branch information
cameroncooke committed Feb 16, 2024
1 parent 8179cae commit a143209
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/GraphQLKit/Graphiti+Enum.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ extension Enum where EnumType: CaseIterable & Encodable & RawRepresentable {
// Initialize an enum type from a `CaseIterable` enum.
public convenience init(
_ type: EnumType.Type,
name: String? = nil
as name: String? = nil
) {
self.init(type) { () -> [Graphiti.Value<EnumType>] in
self.init(type, as: name) { () -> [Graphiti.Value<EnumType>] in
return EnumType.allCases.map({ Value($0) })
}
}
Expand Down

0 comments on commit a143209

Please sign in to comment.