Change Log

v1.6.0

The Apollo iOS ecosystem is changing in the 1.6.0 release in order to provide a better development experience for users. For most users nothing will change, while some users will see a minor difference. The biggest change is that the ApolloCodegenLib is now in a separate repo/package that will need to be included as its own dependency from apollo-ios-codegen if you are doing your code generation through Swift. If you are using the codegen CLI then no changes are necessary.

For a detailed breakdown of the changes please see this GitHub Issue.

Fixed

v1.5.2

The purpose of this release is to provide a deprecation message to users of ApolloCodegenLib who are scripting their code generation in advance of an upcoming change to our libraries and repo structure. Beginning with the upcoming 1.6.0 release the code generation libraries will be their own SPM package in their own repo which will require you to add a new dependency to you project in order for your code generation scripting to compile. More information can be found in our announcement of this change.

If you would like to avoid this deprecation warning in your builds feel free to stay on 1.5.1 or earlier, this warning will be gone in the 1.6.0 release

PR containing deprecation warning for reference: #3243.

v1.5.1

Improvement

Fixed

v1.5.0

New

Fixed

v1.4.0

New

Improvement

v1.3.3

Fixed

v1.3.2

Improved

Fixed

Deprecated

v1.3.1

Fixed

Deprecated

v1.3.0

Though 1.3.0 is a minor version bump, some critical issues were addressed in this version that requires a small breaking change during the upgrade. While we strive to make the upgrade path for minor versions seamless, these issues could not be reasonably resolved without requiring this migration.

For a detailed explanation of the breaking changes and a guide on how to migrate to 1.3.0, see our migration guide.

Breaking

v1.2.2

Added

Fixed

v1.2.1

Improved

Fixed

v1.2

Though 1.2 is a minor version bump, a critical problem was addressed in this version that requires a small breaking change during the upgrade. While we strive to make the upgrade path for minor versions seamless, this issue could not be reasonably resolved without requiring this migration.

For most users, this migration will only require a single change to your SchemaConfiguration.swift file.

For a detailed explanation of the breaking changes and a guide on how to migrate to v1.2, see our migration guide.

Breaking

Improved

Fixed

New

v1.1.3

Fixed

v1.1.2

Fixed

Added

v1.1.1

Fixed

v1.1.0

Apollo iOS v1.1 primarily focuses on adding generated initializers to the generated operation models.

In most cases, the upgrade from v1.0 to v1.1 should require no changes to your code.

Breaking

Fixed

Added

Changed

v1.1.0-beta.1

This is the first Beta Release of Apollo iOS 1.1. Version 1.1 primarily focuses on adding generated initializers to the generated operation models.

While no breaking changes were made to official public APIs, some underscore prefixed APIs that are public but intended for internal usage only have been changed.

Added

Changed

v1.0.7

Fixed

Changed

v1.0.6

Fixed

Changed

v1.0.5

Fixed

v1.0.4

Fixed

New

Changed

v1.0.3

v1.0.2

v1.0.1

v1.0.0

This is the first major version release of Apollo iOS! The primary goal of Apollo iOS 1.0 is to stabilize the API of the model layer and provide a foundation for future feature additions and evolution of the library.

In a nutshell, v1.0.0 brings:

There is documentation and a blog post coming soon. Feel free to ask questions by either opening an issue on our GitHub repo, or joining the community.

Thank you to all contributors who have helped us get to this first major release! ❤️

v1.0.0-rc.1 - Release Candidate #1

This is the first Release Candidate for Apollo iOS 1.0. The Release Candidate is a fully featured and code-complete representation of the final 1.0 version. This includes full feature parity with the 0.x.x releases.

API breaking changes are not expected between the Release Candidate and the General Availability (GA) release. The only code changes will be non-breaking bug fixes due to user feedback. The Release Candidate does not have complete documentation or usage guides, which will be completed prior to GA.

This first major version will include a new code generation engine, better generated models, and many syntax and performance improvements across the entire library. The primary goal of Apollo iOS 1.0 is to stabilize the API of the model layer and provide a foundation for future feature additions and evolution of the library.

v1.0.0-beta.4

This is the fourth Beta Release of Apollo iOS 1.0. The Beta version has full feature parity with the 0.x.x releases. The API is expected to be mostly stable. Some breaking changes may occur due to user feedback prior to General Availability (GA) Release. The Beta does not have complete documentation or usage guides, which will be completed prior to GA.

This first major version will include a new code generation engine, better generated models, and many syntax and performance improvements across the entire library. The primary goal of Apollo iOS 1.0 is to stabilize the API of the model layer and provide a foundation for future feature additions and evolution of the library.

v1.0.0-beta.3

This is the third Beta Release of Apollo iOS 1.0. The Beta version has full feature parity with the 0.x.x releases. The API is expected to be mostly stable. Some breaking changes may occur due to user feedback prior to General Availability (GA) Release. The Beta does not have complete documentation or usage guides, which will be completed prior to GA.

This first major version will include a new code generation engine, better generated models, and many syntax and performance improvements across the entire library. The primary goal of Apollo iOS 1.0 is to stabilize the API of the model layer and provide a foundation for future feature additions and evolution of the library.

v1.0.0-beta.2

This is the second Beta Release of Apollo iOS 1.0. The Beta version has full feature parity with the 0.x.x releases. The API is expected to be mostly stable. Some breaking changes may occur due to user feedback prior to General Availability (GA) Release. The Beta does not have complete documentation or usage guides, which will be completed prior to GA.

This first major version will include a new code generation engine, better generated models, and many syntax and performance improvements across the entire library. The primary goal of Apollo iOS 1.0 is to stabilize the API of the model layer and provide a foundation for future feature additions and evolution of the library.

Breaking: Changed API for Cache Key Configuration: Cache Key Resolution is now easier to configure. See CacheKeyInfo for examples and documentation. Breaking: Changed API for generated Schema Types to support dynamic types The API for generated schema types now initializes instances of Object, Interface, and Union for each corresponding type in your schema. These are still generated by the code generation engine. This differs from the previous API which generated static types that were subclasses of Object, Interface, and Union. The change provides the API to support the future addition of dynamic types added to your schema at runtime. New: Codegen CLI will now automatically create output directories: You no longer are required to have already created all intermediary directories for your codegen output paths prior to running code generation. New: Codegen CLI is built locally with CocoaPods installations: This is to ensure that the version of the Codegen CLI is the same as ApolloCodegenLib. This behaviour will be extended to Swift Package Manager installations too. New: Swift Keywords are escaped when used as names of fields or types in generated objects: Previously, using Swift keywords (eg. self, protocol, Type) as the names of fields in your operations or types in your schema would cause compilation errors in your generated code. Now, these names will be escaped with backticks to prevent compiler errors. The names \_\_data and fragments cannot be used as field names as they conflict with Apollo's generated object APIs Using these names will result in a validation error being thrown when attempting to run the code generation engine. Fixed: Fragments with lowercase names caused compilation errors: This bug is fixed. Fragments with lowercase names will be correctly uppercased when referencing the generated Fragment objects. Fixed: Build errors in Xcode 14/Swift 5.7: The library was updated to support the Swift 5.7 language version. Swift 5.6 is still supported. Fixed: Xcode 14 does not support Bitcode: Starting with Xcode 14, bitcode is no longer required for watchOS and tvOS applications, and the App Store no longer accepts bitcode submissions from Xcode 14.
Fixed: "No such module ApolloAPI" error when using CocoaPods: The podspec was not configured to import all required source files and some import statements were unnecessary in a CocoaPods environment. A code generation configuration option was added to order to ensure generated files are generated with the correct import statements in a CocoaPods environment. When generating code for a project that includes Apollo via Cocoapods, you must set the cocoapodsCompatibleImportStatements option to true in your ApolloCodegenConfiguration. When using the Codegen CLI that is built for you during pod install the apollo-ios-cli init command will default this option to true. When building the Codegen CLI in by other method, this option will default to false.
Removed: ApolloUtils target no longer necessary: The things that used to be shared here are actually no longer shared. There is no code shared between the Apollo and ApolloCodegenLib targets.
Removed: ApolloCodegenConfiguration.validation: This method was incorrectly requiring destination paths to exist before code generation. Once that was removed it was no longer necessary. Any errors that are encountered with destination output paths will be raised during code generation.

v1.0.0-beta.1

This is the first Beta Release of Apollo iOS 1.0. The Beta version has full feature parity with the 0.x.x releases. The API is expected to be mostly stable. Some breaking changes may occur due to user feedback prior to General Availability (GA) Release. The Beta does not have complete documentation or usage guides, which will be completed prior to GA.

This first major version will include a new code generation engine, better generated models, and many syntax and performance improvements across the entire library. The primary goal of Apollo iOS 1.0 is to stabilize the API of the model layer and provide a foundation for future feature additions and evolution of the library.

v1.0.0-alpha.8

This is the eighth Alpha Release of Apollo iOS 1.0. This first major version will include a new code generation engine, better generated models, and many syntax and performance improvements across the entire library. The primary goal of Apollo iOS 1.0 is to stabilize the API of the model layer and provide a foundation for future feature additions and evolution of the library.

v1.0.0-alpha.7

This is the seventh Alpha Release of Apollo iOS 1.0. This first major version will include a new code generation engine, better generated models, and many syntax and performance improvements across the entire library. The primary goal of Apollo iOS 1.0 is to stabilize the API of the model layer and provide a foundation for future feature additions and evolution of the library.

/// SampleLocalCacheMutation.graphql
query SampleLocalCacheMutation @apollo_client_ios_localCacheMutation {
  allAnimals {
    species
    skinCovering
    ... on Bird {
      wingspan
    }
  }
}

/// SampleLocalCacheMutationFragment.graphql
fragment SampleLocalCacheMutationFragment on Pet @apollo_client_ios_localCacheMutation {
  owner {
    firstName
  }
}

v1.0.0-alpha.6

This is the sixth Alpha Release of Apollo iOS 1.0. This first major version will include a new code generation engine, better generated models, and many syntax and performance improvements across the entire library. The primary goal of Apollo iOS 1.0 is to stabilize the API of the model layer and provide a foundation for future feature additions and evolution of the library.

v1.0.0-alpha.5

This is the fifth Alpha Release of Apollo iOS 1.0. This first major version will include a new code generation engine, better generated models, and many syntax and performance improvements across the entire library. The primary goal of Apollo iOS 1.0 is to stabilize the API of the model layer and provide a foundation for future feature additions and evolution of the library.

let mockDog = Mock<Dog>()
mock.species = "Canine"
mock.height = Mock<Height>(feet: 3, inches: 6)

// To mock an object in a generated operation:
let generatedDogMock: AnimalQuery.Data.Animal = AnimalQuery.Data.Animal.mock(from: mockDog)

// To mock an entire query:
let queryMock = Mock<Query>()
queryMock.animals = [mockDog]
let generatedSelectionSetMock: AnimalQuery.Data = AnimalQuery.Data.mock(from: queryMock)

v1.0.0-alpha.4

This is the fourth Alpha Release of Apollo iOS 1.0. This first major version will include a new code generation engine, better generated models, and many syntax and performance improvements across the entire library. The primary goal of Apollo iOS 1.0 is to stabilize the API of the model layer and provide a foundation for future feature additions and evolution of the library.

v1.0.0-alpha.3

This is the third Alpha Release of Apollo iOS 1.0. This first major version will include a new code generation engine, better generated models, and many syntax and performance improvements across the entire library. The primary goal of Apollo iOS 1.0 is to stabilize the API of the model layer and provide a foundation for future feature additions and evolution of the library.

class MyQuery: GraphQLQuery {

  var myVar: GraphQLNullable<String>

  init(myVar: GraphQLNullable<String> { ... }
 // ...
}

let optionalString: String?

// Before

let query = MyQuery(myVar: optionalString.map { .some($0) } ?? .none)

// After
let query = MyQuery(myVar: optionalString ?? .none)

v1.0.0-alpha.2

This is the second Alpha Release of Apollo iOS 1.0. This first major version will include a new code generation engine, better generated models, and many syntax and performance improvements across the entire library. The primary goal of Apollo iOS 1.0 is to stabilize the API of the model layer and provide a foundation for future feature additions and evolution of the library.

v1.0.0-alpha.1

This is the first Alpha Release of Apollo iOS 1.0. This first major version will include a new code generation engine, better generated models, and many syntax and performance improvements across the entire library. The primary goal of Apollo iOS 1.0 is to stabilize the API of the model layer and provide a foundation for future feature additions and evolution of the library.

What’s New

query AnimalQuery {
  allAnimals {
    species
    ... on Pet {
      name
    }
    ... on Cat {
      furColor
    }
}

In the past, the AsCat model would have fields for species, and furColor, but to access the name field, you would need to keep a reference to the AllAnimal object and call AsPet.name. This means that you couldn’t just pass the AsCat object to a UI component.

In 1.0, because we know that Cat implements the Pet interface, the name field is merged into the Cat object.

Any property that should exist based on the type of the object will be accessible. This makes consuming our generated response objects in your applications much easier. This should greatly reduce the need for view models to wrap our generated response objects.

v0.53.0

v0.52.0

v0.51.2

v0.51.1

v0.51.0

v0.50.0

v0.49.1

v0.49.0

v0.48.0

v0.47.1

v0.47.0

v0.46.0

v0.45.0

v0.44.0

v0.43.0

v0.42.0

v0.41.0

v0.40.0

v0.39.0

v0.38.3

v0.38.2

v0.38.1

v0.38.0

v0.37.0

v0.36.0

v0.35.0

v0.34.1

v0.34.0

v0.34.0-rc.2

Networking Stack, Release Candidate

v0.34.0-rc.1

Networking Stack, Release Candidate

v0.34.0-beta2

Networking Stack, Beta 2

v0.33.0

0.33.0-beta1

Networking Stack, Beta 1

v0.32.1

v0.32.0

v0.31.0

v0.30.0

v0.29.1

v0.29.0

v0.28.0

v0.27.1

v0.27.0

v0.26.0

v0.25.1

v0.25.0

v0.24.1

v0.24.0

v0.23.3

v0.23.2

v0.23.1

v0.23.0

v0.22.1

v0.22.0

v0.21.1

v0.21.0

v0.20.1

v0.20.0

v0.19.1

v0.19.0

v0.18.2

v0.18.1

v0.18.0

v0.17.0

v0.16.1

v0.16.0

v0.15.3

v0.15.2

v0.15.1

v0.15.0

All these are pretty much entirely through the ability to use URLSessionDelegate directly since we're now accepting a URLSession you can declare yourself to be the delegate of rather than just the configuration. (#699, inspired by #265)

v0.14.0

v0.13.0

PLEASE READ THESE RELEASE NOTES BEFORE INSTALLING IF YOU WERE USING AN OLDER VERSION!

v0.12.0

v0.11.1

v0.11.0

v0.10.1

v0.10.0

v0.9.5

v0.9.4

v0.9.1

v0.6.0