Releases: apollographql/apollo-ios
Releases · apollographql/apollo-ios
1.22.0
Improvement
- Make cache public within
ReadTransaction
(#661): Some users have use cases for accessing a customNormalizedCache
implementation directly while performing cache transactions. A newReadOnlyNormalizedCache
protocol exposes the cache as read-only in theReadTransaction
and as writable in theReadWriteTransaction
. See PR #661.
Fixed
- Multiple deprecation warning directives not compiling (#3559): Codegen would generate an incorrect list-style character between the Swift deprecation annotations when using multiple deprecation directives in GraphQL. See PR #658. Thank you to @guilherme-anchorage for raising the issue.
- Non-
all
field merging causes selection set initializers to stop being generated for local cache mutations (#3554): Codegen will now force field merging behaviour and selection set initializer generation for local cache mutations. See PR #654. - Referenced fragments within a local cache mutation operation are generated as mutable (#3557): Any fragments referenced within a local cache mutation will now be generated as mutable too, including any fragments within those fragments. See PR #659.
1.21.0
New
- Enhanced Client Awareness (#638): Apollo iOS now sends the library name and version as metadata in the
extensions
key of each request. This Enhanced Client Awareness metric is collected in GraphOS along with the existing Client Awareness and general operation metrics.
Improvement
- Removed SQLite.swift dependency (#635): Removed the dependency on
SQLite.swift
and replaced it with direct interaction with the SQLite C API.
Fixed
- Fix possible data races in the WebSocketTransport (#636): Fixes possible data race issues in the
subscriptions
property inside ofWebSocketTransport
. Thank you to @tahirmt for the contribution. - Fix cache reading of null list items (#3527): Null list items would previously generate a
wrongType
error if stored and read from the cache. This refactors the execution logic to correctly handle values from cache references in lists. See PR #637.
1.20.0
1.19.0
New
- New function to mutate the properties of a local cache mutation fragment. (#3433): Removal of the setter for type conditions made it difficult to work with the properties on those types. A new
mutateIfFulfilled
function was added to facilitate that workflow while still preventing a fragment from being added or removed from an existing model. See PR #608. - Configure
URLRequest
timeout interval (#3522): Added a request context specialization protocol (RequestContextTimeoutConfigurable
) that specifies options for configuring the timeout interval of aURLRequest
. See PR #618.
1.18.0
New
- Reduce Generated Schema Types (#3505): Adds a new codegen configuration option to reduce the number of
Object
types that are generated so that only types that are referenced in an operation document or have a@typePolicy
will be generated. See PR #601.
Improvement
- Identifiable conformance for named fragments (#595): Identifiable conformance was previously implemented (#584) for selection sets and has now been extended to include named fragments. Thank you to @x-sheep for the contribution.
Fixed
- Accessing an unset deprecated field in input causes a crash (#3506):
InputObject
needed aGraphQLNullable
-specific subscript to prevent nil value keys being forcefully unwrapped. See PR #596. Thank you to @pixelmatrix for raising the issue. - Crash in
WebSocketTransport
due to data races (#3512): This data race would occur if starting or stopping a subscription at the same time as a message received on the websocket. To prevent these data races thesubscribers
property is now an@Atomic
property. See PR #599. Thank you to @tahirmt for the contribution.
1.17.0
New
- Add suffix to schema type filenames (#2598): When fragments were named the same as schema types code generation would produce two files with the same name, but at different paths, for each respective type. This would cause a build error in Xcode. There is a new codegen configuration option (
appendSchemaTypeFilenameSuffix
) to add a suffix to schema generated filenames and prevent the build error. See PR #580. - Specify caching fields with
typePolicy
directive (#554): The@typePolicy
directive lets you specify an object's cache ID using key fields of the response object. See the documentation for full details. Thank you to @x-sheep for the contribution. - Emit
Identifiable
conformance onSelectionSet
(#584): If the@typePolicy
of a type uses akeyField
ofid
the selection set will emit conformance to SwiftsIdentifiable
protocol. Thank you to @x-sheep for the contribution.
Improvement
- Improved performance of code generation on operations with many nested fragments (#3434): When fragment field merging is disabled the fragment selection trees are no longer merged into the
EntitySelectionSet
while building operations. See PR #571.
Fixed
- Defer metadata extension (#3505): Metadata extensions for deferred selection sets were incorrectly generated inside the namespace extension for
embeddedInTarget
andother
module types. See PR #581. DataDict
initialization ofdeferredFragments
for named fragments (#587): When deferred fragments are named fragments the deferred type should be the fragment generated definition name.
1.16.1
1.16.0
New
- Added codegen config support for spm module type versions (#539): There is a new codegen config option for supplying a version to the SPM module type to allow for pointing to specific branches or local versions of Apollo iOS.
@oneOf
input object support (#537): Adding support for@OneOf
Input Objects, more info can be found in the official RFC.
Improvements
URLRequest
cache policy default changed (#550): The updated default closer matches the original behaviour before the introduction of settingURLRequest.CachePolicy
. Thank you to @marksvend for raising the issue.
Fixed
DataDict
initialization ofdeferredFragments
property (#557): Generated selection set initializers were not correctly setting deferred fragment identifiers. This only affected selection sets that were instantiated with the generated selection set initializers, response-based results are unaffected.- Multipart chunk content type (#572): Multipart response parsing would produce an error when the chunk content type contained more than one directive. Thank you to @brettephillips for raising the issue.
1.15.3
Improvements
Fixed
- Fix multipart delimter boundary parsing (#502): The multipart message parsing code was not splitting message chunks at the correct boundary.
- Fix Websocket error broadcast for unsubscribed ID (#506) Only broadcast an error to all subscribers if there was no id field in the message.
- Fix bug with
AnyHashable
coercion for non-iOS platforms (#517): Extended the _AnyHashableCanBeCoerced check to include macOS, watchOS, and tvOS with their respective minimum versions. Thank you to @VMLe for the fix. - Fix assigning websocket callback queue before connecting (#529): Fix an issue with assigning the websocket callback queue before connecting the websocket.
- Fix
GraphQLOperation
hash uniqueness (#530): Adding uniqueness to GraphQLOperation hashing.
1.15.2
Improvements
- Set
URLRequest
cache policy on GET requests (#476): Uses the Apollo cache policy to set a comparable cache policy onURLRequest
. Previously there was no way to opt-out of defaultURLRequest
caching behaviour. - Batch writing records to the SQLite store (#498): Uses the
insertMany
to batch write records for a given operation vs previously performing a write for each individual record.