diff --git a/Sources/GraphQLKit/Graphiti+Enum.swift b/Sources/GraphQLKit/Graphiti+Enum.swift index a69f8a4..7ce56c3 100644 --- a/Sources/GraphQLKit/Graphiti+Enum.swift +++ b/Sources/GraphQLKit/Graphiti+Enum.swift @@ -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] in + self.init(type, as: name) { () -> [Graphiti.Value] in return EnumType.allCases.map({ Value($0) }) } }