File tree Expand file tree Collapse file tree
packages/apollo-codegen-swift/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010 - <First ` apollo-codegen-flow ` related entry goes here>
1111- ` apollo-codegen-scala `
1212 - <First ` apollo-codegen-scala ` related entry goes here>
13- - ` apollo-codegen-swift `
14- - <First ` apollo-codegen-swift ` related entry goes here>
13+ - ` apollo-codegen-swift `
14+ - Revert changes from [ # 656 ] ( https://github.com/apollographql/ apollo-tooling/pull/656 ) due to build issues not caught by tests.
1515- ` apollo-codegen-typescript `
1616 - <First ` apollo-codegen-typescript ` related entry goes here>
1717- ` apollo-env `
Original file line number Diff line number Diff line change @@ -1068,9 +1068,7 @@ exports[`Swift code generation #structDeclarationForFragment() should generate a
10681068 // / The friends of the character, or an empty list if they have none
10691069 public var friends : [Friend ? ]? {
10701070 get {
1071- return (resultMap [\\"friends \\"] as ? [ResultMap ?]).flatMap { (value : [ResultMap ? ]) - > [Friend ? ] in value .map { (value : ResultMap ?) -> Friend? in value.flatMap { (value : ResultMap ) - > Friend in Friend (unsafeResultMap : value ) } } }.filter ({
1072- Friend.possibleTypes.contains($0 .__typename )
1073- })
1071+ return (resultMap [\\"friends \\"] as ? [ResultMap ?]).flatMap { (value : [ResultMap ? ]) - > [Friend ? ] in value .map { (value : ResultMap ?) -> Friend? in value.flatMap { (value : ResultMap ) - > Friend in Friend (unsafeResultMap : value ) } } }
10741072 }
10751073 set {
10761074 resultMap.updateValue(newValue .flatMap { (value : [Friend ?]) -> [ResultMap ?] in value .map { (value : Friend ?) -> ResultMap ? in value .flatMap { (value : Friend ) -> ResultMap in value .resultMap } } }, forKey : \\" friends\\ " )
@@ -1222,9 +1220,7 @@ exports[`Swift code generation #structDeclarationForSelectionSet() should genera
12221220 // / The friends of the character, or an empty list if they have none
12231221 public var friends : [Friend ? ]? {
12241222 get {
1225- return (resultMap [\\"friends \\"] as ? [ResultMap ?]).flatMap { (value : [ResultMap ? ]) - > [Friend ? ] in value .map { (value : ResultMap ?) -> Friend? in value.flatMap { (value : ResultMap ) - > Friend in Friend (unsafeResultMap : value ) } } }.filter ({
1226- Friend.possibleTypes.contains($0 .__typename )
1227- })
1223+ return (resultMap [\\"friends \\"] as ? [ResultMap ?]).flatMap { (value : [ResultMap ? ]) - > [Friend ? ] in value .map { (value : ResultMap ?) -> Friend? in value.flatMap { (value : ResultMap ) - > Friend in Friend (unsafeResultMap : value ) } } }
12281224 }
12291225 set {
12301226 resultMap.updateValue(newValue .flatMap { (value : [Friend ?]) -> [ResultMap ?] in value .map { (value : Friend ?) -> ResultMap ? in value .flatMap { (value : Friend ) -> ResultMap in value .resultMap } } }, forKey : \\" friends\\ " )
Original file line number Diff line number Diff line change @@ -727,15 +727,7 @@ export class SwiftAPIGenerator extends SwiftGenerator<CompilerContext> {
727727 expression ,
728728 "ResultMap" ,
729729 structName
730- ) } .filter`
731- ) ;
732- this . withinBlock (
733- ( ) =>
734- this . printOnNewline (
735- `${ structName } .possibleTypes.contains($0.__typename)`
736- ) ,
737- "({" ,
738- "})"
730+ ) } `
739731 ) ;
740732 } ) ;
741733 this . printOnNewline ( "set" ) ;
You can’t perform that action at this time.
0 commit comments