Skip to content

Releases: apollographql/apollo-ios

1.19.0

26 Mar 19:03
Compare
Choose a tag to compare

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 a URLRequest. See PR #618.

1.18.0

18 Feb 21:59
Compare
Choose a tag to compare

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 a GraphQLNullable-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 the subscribers property is now an @Atomic property. See PR #599. Thank you to @tahirmt for the contribution.

1.17.0

28 Jan 01:09
Compare
Choose a tag to compare

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 on SelectionSet (#584): If the @typePolicy of a type uses a keyField of id the selection set will emit conformance to Swifts Identifiable 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 and other module types. See PR #581.
  • DataDict initialization of deferredFragments for named fragments (#587): When deferred fragments are named fragments the deferred type should be the fragment generated definition name.

1.16.1

21 Jan 21:10
Compare
Choose a tag to compare

Fixed

  • Web socket data race crash fixed (#578): A data race in the web socket layer was causing crashes in some rare circumstances.

  • Added support for GraphQL over HTTP media type(#558): Apollo iOS now supports the content-type header with a type of application/graphql-response+json.

1.16.0

09 Jan 00:16
Compare
Choose a tag to compare

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 setting URLRequest.CachePolicy. Thank you to @marksvend for raising the issue.

Fixed

  • DataDict initialization of deferredFragments 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

09 Nov 17:25
Compare
Choose a tag to compare

Improvements

  • Stable sort schema types for SchemaMetadata (#514): Thank you to @asmundg for the contribution.

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

01 Oct 18:09
Compare
Choose a tag to compare

Improvements

  • Set URLRequest cache policy on GET requests (#476): Uses the Apollo cache policy to set a comparable cache policy on URLRequest. Previously there was no way to opt-out of default URLRequest 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.

Fixed

  • Fix ListData type check (#473): Fixed bool type check in ListData.
  • Remove local cache mutation type condition setter (#485): Removes the setter for mutable inline fragments. The correct way to initialize with a type condition is to use asRootEntityType.

1.15.1

26 Aug 20:35
Compare
Choose a tag to compare

Fixed

  • Fix decoding of deprecated selectionSetInitializer option localCacheMutations (#467): This option was deprecated in 1.15.0, and the removal of the code to parse the option resulted in a validation error when the deprecated option was present in the JSON code generation config file. This is now fixed so that the option is ignored but does not cause code generation to fail.
  • Disfavour deprecated watch function (#469): A deprecated version of the watch function matched the overload of the current version if certain parameters were omitted. This caused an incorrect deprecation warning in this situation. We've fixed this by adding @_disfavoredOverload to the deprecated function signature.

1.15.0

16 Aug 19:06
Compare
Choose a tag to compare

New

  • Add ability to disable fragment field merging (#431): Added ApolloCodegenConfiguration option to allow for disabling fragment field merging on generated models. For more information on this feature see the notes here.

Fixed

  • Fix legacyResponse property not being set on HTTPResponse (#456): When the legacyResponse property of HTTPResponse was deprecated setting the value was also removed; this was incorrect as it created a hidden breaking change for interceptors that might have been using the value.
  • Fix ObjectData type check (#459): Fixed bool type check in ObjectData.
  • Fix SelectionSetTemplate scope comparison (#460): Refactored the selection set template scope comparison to account for an edge case in merged sources.
  • Fix memory leak in DataLoader closure (#457): Fixed a memory leak in the DataLoader closure in ApolloStore caused by implicit use of self. Thank you to @prabhuamol for finding and fixing this.

Breaking

  • Bug Fix: Generated Selections Sets in Inclusion Condition Scope: This fixes a bug when using @include/@Skip where generated models that should have been generated inside of a conditional inline fragment were generated outside of the conditional scope. This may cause breaking changes for a small number of users. Those breaking changes are considered a bug fix since accessing the conditional inline fragments outside of the conditional scope could cause runtime crashes (if the conditions for their inclusion were not met). More information here

1.14.1

02 Aug 02:43
Compare
Choose a tag to compare

New

  • Ability to set the journal mode on sqlite cache databases (#3399): There is now a function to set the journal mode of the connected sqlite database and control how the journal file is stored and processed. See PR #443. Thanks to @pixelmatrix for the feature request.

Fixed

  • Fix crash when GraphQLError is “too many validation errors”" (#438): When a GraphQLError from the JS parsing step is a “Too many validation errors” error, there is no source in the error object. Codegen will now check for it to avoid this edge case crash.
  • Cache write interceptor should gracefully handle missing cache records (#439): The work to support the @defer directive introduced a bug where the cache write interceptor would throw if no cache records were returned during response parsing. This is incorrect as there are no cache records in the case of an errors only GraphQL response.
  • Avoid using fatalError on JSONEncodable (#128): The fatal error logic in JSONEncodable was replaced with a type constraint where clause. Thank you to @arnauddorgans for the contribution.
  • Introspection-based schema download creates duplicate @defer directive definition (#3417): The codegen engine can now correctly detect pre-existing @defer directive definitions in introspection sources and prevent the duplicate definition. See PR #440. Thanks to @loganblevins for reporting the issue.