Releases: apollographql/apollo-ios
Releases · apollographql/apollo-ios
Version 0.47.1
- Fixed - Websocket default implementation not included in
ApolloWebSocket
via Cocoapods: Thank you to ketenshi for the contribution!
Version 0.47.0
- Breaking - Removed Starscream dependency: Due to dependency management conflicts it has become easier for us to maintain our WebSockets as part of the
ApolloWebSockets
target instead of an external dependency on a forked version of Starscream. #1906- Removed Starscream as an external dependency in Cocoapods and Swift Package Manager.
- The
DefaultWebSocket
implementation has been replaced withWebSocket
.
- Fixed -
clearCache
not using the provided callback queue:ApolloClient
was not passing the provided callback queue toApolloStore
and therefore the completion block forclearCache
was being called on the main queue. #1904, #1901 - Thank you to Isaac Ressler for the contribution! - Removed - Swift playground: The playground has been moved to a separate repository. #1905
Version 0.46.0
- Removed - Swift experimental codegen: The experimental Swift code generation has been removed from
main
and will instead become available in therelease/1.0-alpha-incubating
branch until a 1.0 release. #1873 - Fixed - Query watcher not being called when the cache is updated on an element by another query/subscrition/mutation: The long-term solution is to integrate web sockets into the request chain but this is an interim fix that allows
WebSocketTransport
to be configured with a store to update the cache when receiving data. This should not break any workarounds others have already implemented. #1889, #1892 - Thank you to tgyhlsb for the contribution!
Version 0.45.0
- Breaking - Downgraded from Starscream v4 to v3! After upgrading to Starscream 4.0, a lot of our users started to experience crashes while using web sockets. We've decided to revert to the more stable Starscream version 3. In order to fix a few known bugs in Starscream 3, we have made a fork of Starscream that Apollo will depend on going forward. In preparation for moving to Apple WebSockets in the future, we have also fully inverted the dependency on Starscream. Between these two changes, a lot of breaking changes to our Web Socket API have been made:
- The
ApolloWebSocketClient
protocol was removed and replaced withWebSocketClient
. WebSocketClient
does not rely directly on Starscream anymore and has been streamlined for easier conformance.ApolloWebSocket
, the default implementation of theWebSocketClient
has been replaced withDefaultWebSocket
. This implementation uses Starscream, but implementations using other websocket libraries can now be created and used with no need for Starscream.WebSocketClientDelegate
replaces direct dependency onStarscream.WebSocketDelegate
for delegates.
- The
- Breaking: Renamed some of the request chain interceptors object:
LegacyInterceptorProvider
->DefaultInterceptorProvider
LegacyCacheReadInterceptor
->CacheReadInterceptor
LegacyCacheWriteInterceptor
->CacheWriteInterceptor
LegacyParsingInterceptor
->JSONResponseParsingInterceptor
- Breaking:
WebSocketTransport
is now initialized with anApolloWebSocket
(or other object conforming to theApolloWebSocketClient
protocol.) Previously, the initializer took in the necessary parameters to create the web socket internally. This provides better dependency injection capabilities and makes testing easier. - Removed class constraint on
ApolloInterceptor
and converted to structs for all interceptors that could be structs instead of classes. - Added
removeRecords(matching pattern: CacheKey)
function to the normalized cache.
Version 0.44.0
- BREAKING: Split
ApolloCore
into two more granular libraries,ApolloAPI
(which will contain the parts necessary to compile generated code) andApolloUtils
(which will contain code shared betweenApollo
andApolloCodegenLib
). If you were previously importingApolloCore
, in most places you will need to importApolloUtils
. If you're using Carthage, you will need to remove the oldApolloCore
xcframework and replace it with the twoApolloAPI
andApolloUtils
frameworks. (#1817) - Fixed a retain cycle in
GraphQLQueryWatcher
. Thanks @gpambrozio! (#1826) - Fixed a stray CocoaPods warning. (#1769)
- Updated the Typescript CLI to version 2.32.13. (#1773)
- Added the ability to specify a
cachePolicy
when callingrefresh
on aGraphQLWatcher
. (#1802)
Version 0.43.0
- BREAKING (or hopefully, fixing): We removed our test libraries from our
Package.swift
file since we're not using it to run tests directly at this time. This prevents SPM from trying to resolve test dependencies that are not actually used in the library, which should reduce any version conflicts. However, if you were using any of our test libs in an unsupported fashion, these will no longer be directly available. (#1745) - Fixed an issue where when
Starscream
returned multiple errors in close succession, an exponential number of web socket reconnections could be created. (#1762) - Updated
class
constraints toAnyObject
constraints, which should silence a few warnings in 12.5 and be more forward compatible. (#1733) - Added the ability to specify a callback queue for the result handler of
GraphQLWatcher
. (#1723) - Fixed a crash when closing a web socket connection and re-opening it immediately. (#1740)
- You can now skip auto-reconnection for updating the header values and connecting payload in
ApolloWebSocket
. (#1759) - Now avoids the
?
when generating aGET
URL ifqueryItems
is empty. (#1729) - Updated use of the
default
fetch policy to include fetch and watch. Note that under the hood, this does not change what fetch policy was pointed to at this time, it just centralizes the logic. (#1737)
Version 0.42.0
- BREAKING: Finally updates our
Starscream
dependency to 4.0.x. Note that due to SOCKS proxy support being removed fromStarscream
, we've correspondeingly removed such support.(#1659) - BREAKING, but only to Swift Scripting: Updated
ApolloSchemaOptions
to more clearly handle introspection (ie, from a URL) vs registry (ie, from Apollo Studio) requests by using an enum. If you were passing in anendpointURL
previously, you need to use the.introspection
enum value going forward. Also changed the name of the field to match the new type. (#1691) - BREAKING: Removed
CoadableParsingInterceptor
and related code designed for new codegen (which is still in progress) since we were wildly over-optimistic on how quickly we'd be using it. (#1670) - Fixed an issue where tasks that were in the
canceling
state could trigger aNo data found for task
assertion failure. (#1677) - Fixed an issue with encoding
+
inGET
requests. (#1653) - Fixed an issue where creating
GET
requests removed existing query params from the URL. (#1687) - Prevented a retain cycle during web socket reconnection. (#1674)
- Added better handling for calling
cancel
on aRequestChain
which has already been cancelled. (#1679)
Version 0.41.0
- BREAKING: Fixed an issue in which
UploadRequests
were not getting headers added via theRequestChainNetworkTransport
'sadditionalHeaders
. Please note that if you've subclassed the RCNT, you'll need to update your overrides since we had to add a parameter. (#1644) - Stopped
GET
requests from sending aContent-Type
header, which could cause servers not configured to ignore that header when the body is empty to freak out. (#1649)
Version 0.40.0
- BREAKING: Dropped support for iOS/tvOS < 12, watchOS < 5, and macOS < 10.14. This also involved removing a couple of public functions that were workarounds for support for lower versions. (#1605)
- Updated the typescript CLI to version
2.32.1
. There may be some structural changes to generated code but it should not actually break anything. Please file bugs immediately if it does. (#1618)
Version 0.39.0
- POSSIBLY BREAKING: Updated
swift-tools
version to 5.3, and added a fallback version ofPackage.swift
for 5.2. (#1584) - BREAKING, technically: Switched
cachePolicy
to avar
onHTTPRequest
. This makes it possible for retries to use a different cache policy, such as when an error has occurred at the network level and you want to fall back to showing what's in the cache without retrying the network call. (#1569) - Added validation in Swift Codegen wrapper that a URL passed in for
singleFile
code generation is a.swift
file and a URL passed in formultipleFiles
code generation is a folder. (#1580)