releases.shpreview
Apollo GraphQL/Apollo iOS

Apollo iOS

$npx -y @buildinternet/releases show apollo-ios
Mon
Wed
Fri
AprMayJunJulAugSepOctNovDecJanFebMarApr
Less
More
Releases6Avg2/moVersionsv2.0.5 → v1.25.5
May 21, 2024

New

  • ID as a custom scalar (#3379): This changes the generation of the built-in GraphQL ID scalar to be treated as a custom scalar that can be modified by the user. See PR #363.

Fixed

  • Adds visionOS deployment to ApolloTestSupport podspec (#364): This adds the visionOS deployment target to the ApolloTestSupport podspec to match the other package managers.
  • Add @_spi(Execution) to executor for import in test mocks (#362): This replaces the use of @testable in ApolloTestSupport with specific @_spi scopes. This resolves a few issues that have been reported where the Apollo module could not be built for testing in non-debug configurations.
May 15, 2024

New

  • Added refetchOnFailedUpdates option to GraphQLQueryWatcher (#347): This allows you to configure the query watcher not to refetch it's query from the server when a cache read to update it's data fails.

Fixed

  • Generated input objects have default nil value for parameters with a schema-defined default value (#2997): When the schema defines a default value for an input parameter, you can now omit that parameter when initializing the input object and the default value will be used. This corrects feature parity with the Apollo Kotlin client. See PR #358.

  • Fix namespacing error in InterfaceTemplate (#3375): This fixes an issue where having a schema type named Interface caused compilation errors in generated code. See PR #359.

Apr 15, 2024

New

  • Added support for visionOS (#3320): All the dependecies that Apollo iOS requires have been updated to add support for visionOS, so we can now add official support for visionOS too. See PR #333.

Improvement

  • Add Sendable conformance to some basic SchemaTypes: This adds Sendable conformance to the some of the generated schema types. This does not mean that all of the generated code is safe to use yet with complete concurrency checking of Swift 5.10 but it gets us closer to that goal. See PR #322. Thanks to @bdbergeron for the contributon.
Apr 5, 2024

This preview release has been superseded by release 1.14.0.

This is the second preview release of @defer support in Apollo iOS which focuses on providing early access to using the @defer directive in your operations. During preview releases bugs can occur, if you do experience anything unexpected please report it to us.

Note: Apollo supports a very specific version of the @defer directive proposal as documented here. The @defer directive is still in the proposal stage and is not an official addition to the GraphQL specification yet. This means that Apollo iOS may not work with all servers that currently support @defer.

In this release

  • Fixed: If your schema explicitly declared the @defer directive then an error about duplicate directives would be thrown during code generation.
  • Fixed: In some cases the operation metadata for deferred fragments may have been generated with incorrect Swift syntax resulting in a build error.

How to use it

We have a sample schema/server that supports @defer and can be launched using the Docker configuration.

Once you have that service launched you can configure your Apollo iOS client to target the apollo-ios and apollo-ios-codegen dependency packages using the preview-defer.2 tag. Below is an example query using @defer against the schema.

query ExampleQuery {
  allProducts {
    sku
    id
    ... on Product @defer(label: "additional") {
      dimensions {
        size
      }
      variation {
        id
        name
      }
    }
  }
}

Alternatively here is a sample client to demonstrate the code generation and operation execution of the @defer directive.

Caveats in this preview release

  • Caching is intentionally disabled for operations using @defer.
Mar 22, 2024

Fixed

  • Fix injecting of context for UploadRequest: Any request context passed into an upload request was not being added to the HTTP request and would not be available to the interceptor chain. See PR (#302). Thanks to @RobertDresler for the contribution.
  • Added support for SPM Package.resolved format version 3 (#3355): When using Xcode 15.3 the codegen CLI would fail the generate command with an error stating the Package.resolve file version is unsupported. Version 3 is now accepted as a valid file format for the codegen version checker. See PR (#304).
  • PrivacyInfo.xcprivacy file is invalid for Apollo and ApolloApi (#3359): We received reports that when submitting to the App Store the submission would fail with an error stating that the privacy manifests were invalid. We identified the error and updated the privacy files. See PR (#309). Thanks to @azilbershtein for raising the issue.

Improvement

  • Provide a direct means to observe changes in ApolloStore: ApolloStore now exposes it's subscriber mechanism publicly. This means you can now observe and receive notifications about changes to the store. See PR (#300). Thanks to @jamesonwilliams for the contribution.
  • Remove redundant iteration in EntitySelectionTree merging algorithm: The conditions for merging selections were revisited and we identified, and removed, a redundant iteration. This is a significant performance improvement as it removes an entire additional iteration through all the conditional scopes in the tree. See PR (#308).
Mar 8, 2024

Alongside the release of Apollo iOS 1.9.2, we are excited to announce the release of Apollo iOS Pagination! This package works alongside the Apollo iOS Client to make fetching and caching of paginated data a lot easier! Fetching paginated data has always been a pain point with our mobile clients, and an elegant solution for this has been a common feature request for many years. This library is feature rich and highly configurable, so we believe that it will be able to make this previously complex and difficult task a lot easier for our users!

This library supports:

  • Reading/Writing paginated data with an Apollo NormalizedCache
  • Watching paginated data for changes
  • Forward, Reverse, and Bi-directional pagination
  • Cursor-based, offset-based, and custom pagination mechanisms

This library is currently released as a 0.x version and is in active development. The API is subject to breaking changes until the stable 1.0 release. We hope that you will check it out and give us your feedback so that we can address any API improvements, edge cases, bugs, or valuable features we hadn’t considered before moving to a 1.0 release soon!

To learn more about Apollo iOS Pagination, see our usage docs.

Fixed

  • Backwards Compatibility issues in 1.9.1: 1.9.1 introduced a minor breaking change for some users who were creating a custom implementaiton of ApolloClientProtocol. Sorry about that! This patch release fixed the compatiblity. See PR #290. Thanks to @michaelloo for raising the issue.

Improvement

  • Session and task descriptions parameters added to URLSessionClient (#286): The URLSessionClient now allows you to set a sessionDescription on the session and taskDescription on each task. These are helpful when debugging, especially when analyzing HTTP traffic with Instruments. Thanks to @hishma for the contribution.
Mar 4, 2024

Fixed

  • SelectionSet generated initializers don't compile with self parameter (#3330): Selection set initializers now use a local property name when the external property name is a Swift reserved word; see PR #257. Thanks to @grantjbutler for raising the issue.
  • asXXXXXXX property on a union never returning nil if selection set empty (#3326): - The codegen logic to determine whether a selection set is composite or not has been improved to handle the case when __typename was the only field in the selection set; see PR #261. Thanks to @vincentisambart for raising the issue.

Improvement

  • Feature/ContextIdentifier for the mutate queries (#281): Mutation operations can now be given a context identifier to be used later in the request. Thanks to @VladimirK-ah for the contribution.
Feb 2, 2024

Improvement

  • New import directive for operations: GraphQL operations now support a directive to control custom module import statements in the generated file. Any operation that includes the directive @import(module:), on the defintion line, with a supplied String as the module name will have that module used in a Swift import statement at the top of the operation file and any referenced fragments. Thank you to @hemel for the contribution (#236 / #245).

Fixed

  • The fragmentDefinition remains in all generated fragments when operationDocumentFormat does not include .definition (#3282): Code generation will now only generate definitions in fragment files if the operationDocumentFormat config contains the .definition value (#218). Thank you to @jimisaacs for raising the issue.
  • Custom scalar file header comment (#3323): The header comment for generated custom scalar files was incorrectly changed to state that the output "should not be edited" but the file content could still be edited and would not be overwritten. The header comment has been changed back to state that the contents will be preserved during subsequent codegen executions. Thank you to @matsudamper for raising the issue and the contribution to fix it (#243).

Changed

  • WebSocket disconnection errors are no longer printed to stdout (#3325): See PR (#253) Thank you to @sgade for raising the issue.
Jan 12, 2024

Fixed

  • Duplicate @defer directive error (#235): When executing codegen against Apollo Router and a schema that supports the @defer directive it would fail with an error stating the directive is duplicated.

Changed

  • InstallCLI plugin updates (#132): The InstallCLI plugin now downloads the CLI binary from GitHub. This requires that we update the swift-tools-version to 5.9, therefore Xcode 15 is now the minimum version of Xcode allowed.

Improvement

  • Added InputObject casing strategy (#137): We've added a new casing strategy option for InputObjects which mimics the behaviour of the enum case conversion strategy. Thank you to @alexifrim for raising this in issue #3257.
  • Added GraphQLResult conversion extension (#139): GraphQLResult response data can now be easily converted into a JSON dictionary. This is useful for taking server response data and serializing it into a JSON dictionary which can then be used in a test suite.
  • Codegen performance improvements (#152): There has been a bunch of refactoring work to prepare for future codegen features but we've also managed to squeeze out some performance improvements.
Jan 5, 2024

This preview release has been superseded by release 1.14.0.

This is the first preview release of @defer support in Apollo iOS which focuses on providing early access to using the @defer directive in your operations. During preview releases bugs can occur, if you do experience anything unexpected please report it to us.

Note: Apollo supports a very specific early RFC version of the @defer directive as documented here. The @defer directive is still an RFC and is not an official addition to the GraphQL specification yet. This means that Apollo iOS may not work with all servers that currently support @defer.

How to use it We have a sample schema/server that supports @defer and can be launched using the Docker configuration.

Once you have that service launched you can configure your Apollo iOS client to target the apollo-ios and apollo-ios-codegen dependency packages using the preview-defer.1 tag. Below is an example query using @defer against the schema.

query ExampleQuery {
  allProducts {
    sku
    id
    ... on Product @defer(label: "additional") {
      dimensions {
        size
      }
      variation {
        id
        name
      }
    }
  }
}

Alternatively here is a sample client to demonstrate the code generation and operation execution of the @defer directive.

Caveats in this preview release

  • Caching is intentionally disabled for operations using @defer.
Nov 13, 2023

Fixed

  • Fixed inconsistent ordering of fragments in generated operation definitions (#130): In order to make the ordering of fragments consistent, they are now alphabetized. This is a change to the data that gets sent over the wire when making a network request for an operation with fragments. Persisted Queries users should re-register their queries when upgrading to this version. Thank you to @scottasoutherland for reporting the issue.

Improvement

  • Add initializer for SelectionSet that takes a [String: Any] JSON object (#102): Thank you to @Cookiezby for the contribution.
Nov 1, 2023

ApolloCodegenLib Now Uses Swift Concurrency To improve the performance of the code generation, the ApolloCodegenLib now uses async/await. Code generation is now parallelized and should complete much faster for users with a large number of GraphQL files. This means that the entry point function, ApolloCodegen.build(with configuration:) is now an async function. For users using the ApolloCodegenLib directly, you will need to make your call sites into this function use async/await. In most cases, this requires minimal code changes. Please see the 1.7.0 migration guide for information on how to upgrade.

See PR #57.

Fixed

  • Fixed a bug with ApolloAPI.Object clashing with custom objects name Object (#94): Thank you to 215eight for reporting the issue.
Oct 12, 2023

Fixed

  • Fix bug with AnyHashable coercion (#68): This is an additional fix for the crashes on iOS 14.4.1.
Oct 6, 2023

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

  • Fixed crashes in iOS 14.4 and below (#61): Thank you to matijakregarGH for reporting the issue.
Sep 29, 2023

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.

Improvement

  • Added OutputOptions property to codegen for marking generated classes as final (#3189): Thank you to @Mordil for the contribution.

Fixed

  • Codegen itemsToGenerate option for .all not generating an operation manifest (#3215): Thank you to @TizianoCoroneo for finding and fixing the issue.
  • Codegen operation manifest inadvertantly being generated twice (#3225): Thank you to @jimisaacs for finding and fixing the issue.
Sep 5, 2023

New

  • Added the ability pass a custom RequestContext to networking APIs (#3198): Thank you to @danieltiger for the contribution.
    • Minor Breaking Change: The requestContext parameter is optional with a default value of nil. This means there are no breaking changes to the APIs for making networking calls. However, the requestContext parameter was also added to the ApolloClientProtocol. For custom implementations of this protocol (usually used for unit testing), you will need to add the requestContext parameter to your function signatures.

Fixed

  • Null values are no longer stripped from the underlying data used by generated SelectionSet models (apollo-ios-dev/#25):
    • When these models were manually inserted into the cache, the null fields, which were stripped, were not written to the cache. This caused unintended cache misses when fetching those values back out of the cache.
    • This fixes #3092. Thank you to @aleksanderlorenc-lw for raising this issue.
Aug 10, 2023

v1.4.0

New

  • Added the ability to set a casing strategy for field names in code generation (#2738): See PR (#3171). Thank you to @Spatel91111 for the feature request.

Improvement

  • Updated the way persisted queries are configured for code and manifest generation: See PR (#3175)
  • Updated docs for other schema module type to provide more clarity (#3164): See PR (#3170) Thank you to @Mordil for suggesting this update.
Aug 1, 2023

Fixed

  • Fix two issues with generated models: See PR (#3168). Thank you to @iAmericanBoy for finding these issues and providing a reproduction case.
  • Fix computation of operation identifiers for persisted queries: See PR (#3163). Thank you to @WolframPRO for finding these issues.
Jul 20, 2023

Improved

  • Throw an error when an invalid key is present in the codegen configuration JSON (#2942): See PR (#3125) Thank you to @Iron-Ham for the contribution.
  • Cleanup unused imports and declarations. (#3099): See PR (#3100) Thank you to @Iron-Ham for raising the issue and contributing the fix.
  • Improvement to response code error API (#2426): See PR (#3123). Thank you to @dfperry5 for the contribution.
  • Improved file path support for operation manifest generation: See PR (#3128)

Fixed

  • Fix two issues in test mock generation: See PR (#3120). Thank you to @TizianoCoroneo for finding this issue and contributing the fix.
  • Fixed precondition failure when surpassing graphql-js max error count (#3126): See PR (#3132).

Deprecated

  • Deprecated queryStringLiteralFormat in ApolloCodegenConfiguration: Query string literals will now always be generated as single line strings. See PR (#3129).
Latest
1.25.5
Tracking Since
Sep 2, 2021
Last fetched Apr 18, 2026