Releases: apollographql/apollo-ios
Version 0.15.2
-
Update Apollo CLI requirement to 2.18. This should pull in a couple fixes to the CLI:
- Way better escaping of identifiers, types, and strings (Tooling #1515)
- Fix compiler warning when an optional has a
.nonecase (Tooling #1482)
If you run into any weird build issues after this update, try deleting your local
node_modulesfolder and rebuilding before filing an issue. (#760) -
Better handling of the
localizedDescriptionforHTTPResponseError. (#756)
Version 0.15.1
Version 0.15.0
-
BREAKING: Finally swapped out
URLSessionConfigurationon initializer forHTTPNetworkTransportto useURLSessiondirectly instead. If you were previously passing in a configuration, first hand it to aURLSessioninstance and then pass that instance into the initializer.This allows many new things including:
- Support for background sessions
- Easier mocking through
NSURLProtocol - Certificate pinning
- Self-signed certificates
- Metrics inspection
- Authentication challenge handling
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)
- BREAKING, though hopefully in a good way: Significant updates to the Upload functionality to make it conform more closely to the GraphQL Upload Spec. Also added a goodly bit of documentation around this functionality. (#707)
- Way better support for Swift Package Manager, especially for
ApolloSQLiteandApolloWebSocket. (#674) - Created
ApolloClientProtocolto match all public methods ofApolloClientfor easier mocking. (#715, inspired by #693)
Version 0.14.0
- BREAKING Updated codegen to use 2.17 of the Apollo CLI. Please see the full release notes for that version of the CLI, but in short:
- Stops force-unwrapping and instead nil-coalesce to
.nonewhen the thing being unwrapped was a double-optional, which was causing some crashes - Fixes issue where removing redundant modifiers was a little too agressive
- Fixes escaping for
Selfas a type name - Adds
CaseIterablefor all known cases of an enum. If you were adding this yourself previously, you'll have to take it back out. - Adds comment with original operation to
operationDefinition, stripped excess whitespace from actual definition.
- Stops force-unwrapping and instead nil-coalesce to
- Added explicit support for Catalyst builds. (#688)
- Added support for
Intcustom scalars. (#402) - Exposed
clearCachedirectly on stores so a store being used by multiple clients can be more explicitly cleared. (#518) - Fixed an issue where an error on cache write would not be propagated correctly. (#673)
- Updated supported Node version to the Long-Term Support version. (#672)
Version 0.13.0
PLEASE READ THESE RELEASE NOTES BEFORE INSTALLING IF YOU WERE USING AN OLDER VERSION!
-
SUPER-BREAKING: Updated a ton of completion closures that could use it to use
Resultinstead of optional parameter / optional error. (#644). There are a few details to this one to be particularly aware of:- If you see a bunch of Swift build errors that are claiming Generic Parameter "Query" could not be inferred, that means you need to update your completion closure to take the single
Result<Parameter, Error>parameter instead of the two (Parameter?,Error?) parameters. - Particularly around caching, if there are places where both parameters were
nilin previous iterations, you will now get anError. This will generally be aJSONDecodingError.missingValue, either as the direct error or as theunderlyingerror of aGraphQLResultError. Please check out the changes toFetchQueryTestsin PR #644 for a better look at how some of that has changed.
- If you see a bunch of Swift build errors that are claiming Generic Parameter "Query" could not be inferred, that means you need to update your completion closure to take the single
-
BREAKING: Updated the codegen to use v2.16 of the Apollo CLI. (#647). This is a major version change so some things need to be added, and some parameter names have changed:
- You must add
--target=swiftso the CLI knows to generate Swift code. - If you were using
--schema=schema.json, use--localSchemaFile="schema.json"instead (the quotes are required!). - If you were using
--queries="$(find . -name '*.graphql')"to pass in an array of all your GraphQL files, use--includes=./*.graphqlinstead.
If you get error messages about multiple versions of node when you attempt to run, delete the
node_modulesfolder in your source root and rebuild.Upgrading fixes several issues:
operationNameis now generated for all operations.- Trailing newlines are now added to all generated files.
- You must add
-
NEW: Ability to upload files according to the GraphQL Multi-part request spec. (#626, #648, inspired by #116)
-
NEW: Now that
operationNameis generated for all operations, we're sending it along with all requests. (#657, inspired by #492) -
NEW: We're also sending
operationNameas theX-APOLLO-OPERATION-NAMEheader and when anoperationIdentifieris provided, sending that as theX-APOLLO-OPERATION-IDheader. (#658) -
NEW: Option to run
VACUUMon your SQLite store when clearing to help obliterate all traces of data. (#652) -
NEW: Auto-generated API documentation from inline comments. Now available on the website NOTE: Any manual changes made to markdown files will get overwritten, if you want to contribute to the docs, please add inline comments to the code and then I'll get the docs updated. (#642).
-
Made
GraphQLResultErrorand its underlying errorpublicfor better error handling. (#655)
Version 0.12.0
- BREAKING: Removed internal
Resulttype in favor of Swift's built inResulttype. This allows you to not have to prefix anything that uses the built-in result type withSwift.Resultin places where you're using the Apollo SDK. (#641) - BREAKING: Set strict dependency versions for Starscream and SQLite.swift to prevent potential problems with Swift version conflicts. (#641).
- BREAKING: Made Carthage dependencies for Starscream and SQLite.swift private so they're not automatically pulled in when trying to build just the main SDK with Carthage. If you're using the
ApolloSQLiteorApolloWebSocketframeworks with Carthage, please read the updated documentation!. (#635, #641) - Fixed issue where
GETrequests were requiringAnyHashableinstead ofAnywhich made requests withBoolproperties never send. (#628, big thanks to #624)
Version 0.11.1
- Fixed missing
Foundationimports for several classes that were causing issues with Buck and Swift Package Manager builds. (#620) - Updated version of
SQLite.swiftdependency to one that properly supports Swift 5. (#621) - Whole mess o'documentation updates. (#618)
- Fixed a whitespace issue with one of the build scripts. (#618)
- Made the
GraphQLResultinitializer public for testing. (#544)
Version 0.11.0
- BREAKING: Updated Podspec to preserve paths rather than embedding scripts in the framework. Updated instructions for embedding with CocoaPods. (#575, #610)
- NEW: At long last, the ability to update headers on preflight requests, the ability to peer into what came to the
URLSessionand the ability to determine if an operation should be retried. (#602) - NEW: Added
.fetchIgnoringCacheCompletelycaching option, which can result in significantly faster performance if you don't need the caching. (#551) - NEW: Added support for using
GETfor queries. (#572, #599, #602) - Updated lib and dependencies to use Swift 5, and say so in the Podfile. (#522, #528, #561, #592)
- Exposed a method to ping a WebSocket server to keep it alive. (#422)
- Handling is always done on a handler queue. (#539)
- Added documentation on the
readandupdateoperations for watching queries. (#452) - Updated build scripts for non-CocoaPods installations to account for spaces in project names or folders. (#610)
- Fixed a code generation fail if you're using MacPorts instead of Homebrew to install
npm. (#591)