@@ -11,12 +11,12 @@ public final class SchemaBuilder<Resolver, Context> {
1111 private var subscriptionFields : [ FieldComponent < Resolver , Context > ]
1212
1313 public init (
14- _ resolverType : Resolver . Type ,
15- _ contextType : Context . Type
14+ _: Resolver . Type ,
15+ _: Context . Type
1616 ) {
1717 coders = Coders ( )
1818 typeComponents = [ ]
19-
19+
2020 queryName = " Query "
2121 queryFields = [ ]
2222 mutationName = " Mutation "
@@ -33,19 +33,19 @@ public final class SchemaBuilder<Resolver, Context> {
3333 coders = newCoders
3434 return self
3535 }
36-
36+
3737 @discardableResult
3838 public func setQueryName( to name: String ) -> Self {
3939 queryName = name
4040 return self
4141 }
42-
42+
4343 @discardableResult
4444 public func setMutationName( to name: String ) -> Self {
4545 mutationName = name
4646 return self
4747 }
48-
48+
4949 @discardableResult
5050 public func setSubscriptionName( to name: String ) -> Self {
5151 subscriptionName = name
@@ -57,49 +57,53 @@ public final class SchemaBuilder<Resolver, Context> {
5757 /// - Parameter component: The query operations to add
5858 /// - Returns: This object for method chaining
5959 public func add(
60- @TypeComponentBuilder < Resolver , Context > _ components: ( ) -> [ TypeComponent < Resolver , Context > ]
60+ @TypeComponentBuilder < Resolver , Context > _ components: ( )
61+ -> [ TypeComponent < Resolver , Context > ]
6162 ) -> Self {
6263 for component in components ( ) {
6364 typeComponents. append ( component)
6465 }
6566 return self
6667 }
67-
68+
6869 @discardableResult
6970 /// Adds multiple query operation definitions to the schema.
7071 /// - Parameter component: The query operations to add
7172 /// - Returns: This object for method chaining
7273 public func addQuery(
73- @FieldComponentBuilder < Resolver , Context > _ fields: ( ) -> [ FieldComponent < Resolver , Context > ]
74+ @FieldComponentBuilder < Resolver , Context > _ fields: ( )
75+ -> [ FieldComponent < Resolver , Context > ]
7476 ) -> Self {
7577 for field in fields ( ) {
76- self . queryFields. append ( field)
78+ queryFields. append ( field)
7779 }
7880 return self
7981 }
80-
82+
8183 @discardableResult
8284 /// Adds multiple mutation operation definitions to the schema.
8385 /// - Parameter component: The query operations to add
8486 /// - Returns: This object for method chaining
8587 public func addMutation(
86- @FieldComponentBuilder < Resolver , Context > _ fields: ( ) -> [ FieldComponent < Resolver , Context > ]
88+ @FieldComponentBuilder < Resolver , Context > _ fields: ( )
89+ -> [ FieldComponent < Resolver , Context > ]
8790 ) -> Self {
8891 for field in fields ( ) {
89- self . mutationFields. append ( field)
92+ mutationFields. append ( field)
9093 }
9194 return self
9295 }
93-
96+
9497 @discardableResult
9598 /// Adds multiple subscription operation definitions to the schema.
9699 /// - Parameter component: The query operations to add
97100 /// - Returns: This object for method chaining
98101 public func addSubscription(
99- @FieldComponentBuilder < Resolver , Context > _ fields: ( ) -> [ FieldComponent < Resolver , Context > ]
102+ @FieldComponentBuilder < Resolver , Context > _ fields: ( )
103+ -> [ FieldComponent < Resolver , Context > ]
100104 ) -> Self {
101105 for field in fields ( ) {
102- self . subscriptionFields. append ( field)
106+ subscriptionFields. append ( field)
103107 }
104108 return self
105109 }
@@ -120,7 +124,7 @@ public final class SchemaBuilder<Resolver, Context> {
120124 }
121125 for subscription in partials. flatMap ( { $0. subscription } ) {
122126 subscriptionFields. append ( subscription)
123- }
127+ }
124128 return self
125129 }
126130
0 commit comments