@@ -63,7 +63,7 @@ When you build, the plugin will automatically generate Swift code that you can v
6363Create a type named `GraphQLContext`:
6464
6565```swift
66- public actor GraphQLContext {
66+ actor GraphQLContext {
6767 // Add any features you like
6868}
6969```
@@ -137,7 +137,7 @@ type A {
137137
138138This would result in the following protocol :
139139```swift
140- public protocol A : Sendable {
140+ protocol A : Sendable {
141141 func foo (context : GraphQLContext , info : GraphQLResolveInfo ) async throws -> String
142142}
143143```
@@ -177,34 +177,34 @@ Scalar types are not modeled by the generator. They are simply referenced using
177177Below is an example that represents a scalar struct as a raw String:
178178
179179``` swift
180- public struct EmailAddress : GraphQLScalar {
180+ struct EmailAddress : GraphQLScalar {
181181 let email: String
182182
183183 init (email : String ) {
184184 self .email = email
185185 }
186186
187187 // Codability conformance. Represent simply as `email` string.
188- public init (from decoder : any Decoder) throws {
188+ init (from decoder : any Decoder) throws {
189189 self .email = try decoder.singleValueContainer ().decode (String .self )
190190 }
191- public func encode (to encoder : any Encoder) throws {
191+ func encode (to encoder : any Encoder) throws {
192192 try self .email .encode (to : encoder)
193193 }
194194
195195 // Scalar conformance. Parse & serialize simply as `email` string.
196- public static func serialize (this : Self ) throws -> Map {
196+ static func serialize (this : Self ) throws -> Map {
197197 return .string (this.email )
198198 }
199- public static func parseValue (map : Map) throws -> Map {
199+ static func parseValue (map : Map) throws -> Map {
200200 switch map {
201201 case .string :
202202 return map
203203 default :
204204 throw GraphQLError (message : " EmailAddress cannot represent non-string value: \( map ) " )
205205 }
206206 }
207- public static func parseLiteral (value : any Value ) throws -> Map {
207+ static func parseLiteral (value : any Value ) throws -> Map {
208208 guard let ast = value as? StringValue else {
209209 throw GraphQLError (
210210 message : " EmailAddress cannot represent non-string value: \( print (ast : value)) " ,
0 commit comments