From a143209301ff8fbb3c9806839a37a8e1ac33b029 Mon Sep 17 00:00:00 2001 From: Cameron Cooke Date: Fri, 16 Feb 2024 12:24:57 +0000 Subject: [PATCH] Update Graphiti+Enum.swift Add missing `name` parameter to enum convenience initializer --- Sources/GraphQLKit/Graphiti+Enum.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) }) } }