@@ -98,7 +98,7 @@ extension Field {
9898 }
9999
100100 private var fName : String {
101- name. camelCase . normalize
101+ name. camelCasePreservingSurroundingUnderscores . normalize
102102 }
103103
104104 private func fParameters( context: Context ) throws -> String {
@@ -148,7 +148,7 @@ private extension Collection where Element == InputValue {
148148 /// Returns a one-to-one argument mapping.
149149 func arguments( field: Field , context: Context ) -> String {
150150 let args = self
151- . map { $0. name. camelCase } . map { " \( $0) : \( $0. normalize) " }
151+ . map { $0. name. camelCasePreservingSurroundingUnderscores } . map { " \( $0) : \( $0. normalize) " }
152152 . joined ( separator: " , " )
153153
154154 switch field. type. namedType {
@@ -166,7 +166,7 @@ private extension Collection where Element == InputValue {
166166extension InputValue {
167167 /// Generates a function parameter for this input value.
168168 fileprivate func parameter( context: Context ) throws -> String {
169- " \( name. camelCase . normalize) : \( try type. type ( scalars: context. scalars) ) \( self . default) "
169+ " \( name. camelCasePreservingSurroundingUnderscores . normalize) : \( try type. type ( scalars: context. scalars) ) \( self . default) "
170170 }
171171
172172 /// Returns the default value of the parameter.
@@ -224,7 +224,7 @@ private extension Collection where Element == InputValue {
224224private extension InputValue {
225225 /// Returns a SwiftGraphQL Argument definition for a given input value.
226226 var argument : String {
227- #"Argument(name: " \#( name) ", type: " \#( type. argument) ", value: \#( name. camelCase . normalize) )"#
227+ #"Argument(name: " \#( name) ", type: " \#( type. argument) ", value: \#( name. camelCasePreservingSurroundingUnderscores . normalize) )"#
228228 }
229229}
230230
0 commit comments