Releases: apollographql/apollo-ios
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
.none
when 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
Self
as a type name - Adds
CaseIterable
for 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
Int
custom scalars. (#402) - Exposed
clearCache
directly 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
Result
instead 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
nil
in previous iterations, you will now get anError
. This will generally be aJSONDecodingError.missingValue
, either as the direct error or as theunderlying
error of aGraphQLResultError
. Please check out the changes toFetchQueryTests
in 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=swift
so 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=./*.graphql
instead.
If you get error messages about multiple versions of node when you attempt to run, delete the
node_modules
folder in your source root and rebuild.Upgrading fixes several issues:
operationName
is 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
operationName
is generated for all operations, we're sending it along with all requests. (#657, inspired by #492) -
NEW: We're also sending
operationName
as theX-APOLLO-OPERATION-NAME
header and when anoperationIdentifier
is provided, sending that as theX-APOLLO-OPERATION-ID
header. (#658) -
NEW: Option to run
VACUUM
on 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
GraphQLResultError
and its underlying errorpublic
for better error handling. (#655)
Version 0.12.0
- BREAKING: Removed internal
Result
type in favor of Swift's built inResult
type. This allows you to not have to prefix anything that uses the built-in result type withSwift.Result
in 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
ApolloSQLite
orApolloWebSocket
frameworks with Carthage, please read the updated documentation!. (#635, #641) - Fixed issue where
GET
requests were requiringAnyHashable
instead ofAny
which made requests withBool
properties never send. (#628, big thanks to #624)
Version 0.11.1
- Fixed missing
Foundation
imports for several classes that were causing issues with Buck and Swift Package Manager builds. (#620) - Updated version of
SQLite.swift
dependency 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
GraphQLResult
initializer 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
URLSession
and the ability to determine if an operation should be retried. (#602) - NEW: Added
.fetchIgnoringCacheCompletely
caching option, which can result in significantly faster performance if you don't need the caching. (#551) - NEW: Added support for using
GET
for 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
read
andupdate
operations 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)