Releases: apollographql/apollo-ios
1.5.0
New
- Added the ability pass a custom
RequestContext
to networking APIs (#3198): Thank you to @danieltiger for the contribution.- Minor Breaking Change: The
requestContext
parameter is optional with a default value ofnil
. This means there are no breaking changes to the APIs for making networking calls. However, therequestContext
parameter was also added to theApolloClientProtocol
. For custom implementations of this protocol (usually used for unit testing), you will need to add therequestContext
parameter to your function signatures.
- Minor Breaking Change: The
Fixed
- Null values are no longer stripped from the underlying data used by generated
SelectionSet
models (apollo-ios-dev/#25):- When these models were manually inserted into the cache, the null fields, which were stripped, were not written to the cache. This caused unintended cache misses when fetching those values back out of the cache.
- This fixes #3092. Thank you to @aleksanderlorenc-lw for raising this issue.
1.4.0
v1.4.0
New
- Added the ability to set a casing strategy for field names in code generation (#2738): See PR (#3171). Thank you to @Spatel91111 for the feature request.
Improvement
1.3.3
Fixed
- Fix two issues with generated models: See PR (#3168). Thank you to @iAmericanBoy for finding these issues and providing a reproduction case.
- Fix computation of operation identifiers for persisted queries: See PR (#3163). Thank you to @WolframPRO for finding these issues.
1.3.2
Improved
- Throw an error when an invalid key is present in the codegen configuration JSON (#2942): See PR (#3125) Thank you to @Iron-Ham for the contribution.
- Cleanup unused imports and declarations. (#3099): See PR (#3100) Thank you to @Iron-Ham for raising the issue and contributing the fix.
- Improvement to response code error API (#2426): See PR (#3123). Thank you to @dfperry5 for the contribution.
- Improved file path support for operation manifest generation: See PR (#3128)
Fixed
- Fix two issues in test mock generation: See PR (#3120). Thank you to @TizianoCoroneo for finding this issue and contributing the fix.
- Fixed precondition failure when surpassing graphql-js max error count (#3126): See PR (#3132).
Deprecated
- Deprecated
queryStringLiteralFormat
inApolloCodegenConfiguration
: Query string literals will now always be generated as single line strings. See PR (#3129).
1.3.1
Fixed
- Fix crashes in test mocks when setting an array of union types (#3023): See PR (#3089). Thank you to @jabeattie & @scottasoutherland for raising the issue.
Deprecated
- Deprecated
APQConfig
&operationIdentifiersPath
inApolloCodegenConfiguration
.- These have been replaced with
OperationDocumentFormat
andOperationManifestFileOutput
respectively. Please see the documentation forApolloCodegenConfiguration
for more information.
- These have been replaced with
1.3.0
Though 1.3.0
is a minor version bump, some critical issues were addressed in this version that requires a small breaking change during the upgrade. While we strive to make the upgrade path for minor versions seamless, these issues could not be reasonably resolved without requiring this migration.
For a detailed explanation of the breaking changes and a guide on how to migrate to 1.3.0
, see our migration guide.
Breaking
1.2.2
Added
- Support SOCKS proxies for debugging websocket based subscriptions(#2788): Thank you to @tahirmit for the contribution.
Fixed
- Fix conversion of generated models into nested type cases (#2989 & #2980): In some cases, the generated models were missing types when calculating which fragments were fulfilled for a selection set. This was causing type case conversion to return
nil
incorrectly. See PR #3067. Thank you to @tgyhlsb and @dafurman for raising these issues. - Fix crashes in code generation when merging fragments at definition root (#3071): When fragments with type conditions were defined on the root of an operation or named fragment, the code generation engine was crashing. See PR #3073. Thank you to @tahirmit for raising and helping us reproduce this issue.
- Fix parsing of input objects as default values for input params (#2978): The codegen engine will no longer crash in this situation. Thank you to @ecunha-ta for raising the issue.
1.2.1
1.2.0
Though 1.2 is a minor version bump, a critical problem was addressed in this version that requires a small breaking change during the upgrade. While we strive to make the upgrade path for minor versions seamless, this issue could not be reasonably resolved without requiring this migration.
For most users, this migration will only require a single change to your SchemaConfiguration.swift
file.
For a detailed explanation of the breaking changes and a guide on how to migrate to v1.2, see our migration guide.
Breaking
- Cache Key Configuration API Changes (#2990): The API for configuring custom cache keys has had a minor change in this version. The signature of the
cacheKeyInfo(for:object:)
function, defined in your generated SchemaConfiguration.swift file, has been modified. For more information, see our migration guide.
Improved
- Improved performance of GraphQL execution (#2990): Improvements to the
GraphQLExecutor
resulted in a ~15-20% reduction in execution time for parsing and mapping network response or cache data onto generated models. - Improved performance of generated model initialization and type conversions (#2990): The
DataDict
used to store the data for generated models has been updated to use copy-on-write value semantics. This resulted in a ~70-80% reduction in the execution time of initialization and type case conversions in the generated models.
Fixed
- Pruning generated files for
.relative(subpath:)
operations (#2969): See PR #2994. Thank you to @jimisaacs for raising the issue. - InputObjects generated with incorrect getter/setter key (#2858): See PR #2996. Thank you to @Austinpayne for raising the issue.
- Generates conflicting types for fields of singular and plural names (#2850): See PR #3009. Thank you to @sgade for raising the issue.
- Equality operator shows incorrect values based on value of
__fulfilled
(#2944): See PR #2990. Thank you to @scottasoutherland for raising the issue.
New
- Add option to generate objects with
internal
access modifier (#2630): See PR #2917. Thank you to @simonbilskyrollins for the feature request.
1.1.3
Fixed
@dynamicMember
conflicting field name (#2950): The subscript setters have been changed to allow a selection set property namedhash
. #2965 Thank you to @renanbdias for raising the issue.- Disallow certain targetNames in code generation (#2958):
apollo
is no longer allowed as a target name otherwise it causes a conflict when importingApollo
as a module. #2972 Thank you to @moopoints for raising the issue. - Fully Qualify name of RootEntityType and mergedSources (#2949): Selection set types use fully qualified namespacing to prevent conflicts with other types. #2956 Thank you to @martin-muller for raising the issue.
- SelectionSet Codegen
__typename
fix (#2955): Custom root types defined in the schema are now correctly applied to selection set fields typename definitions #2983 Thank you to @ynnadrules for raising the issue.