New
- Configure cache keys for an operation using the new
@fieldPolicy
directive. (#735): Added a new@fieldPolicy
directive that can be used to configure cache keys for reading data from the cache prior to making a network request for an operation. Cache keys can also be configured programatically, for more information see documentation here.
Improvement
- Add batching to sqlite selects. (#725): Adding batching to the SQLite select handling to cap the number of parameters at 500 per query.
- Add result code to
SQLiteError
. (#755): Adding the raw sqlite result code as an associated value on enum cases ofSQLiteError
. - Add
RootSelectionSet
convenience initializer from inline fragment. (#748): Added a convenience initializer toRootSelectionSet
that allows it to be initialized directly from anInlineFragment
, simplifying the conversion process between fragments and root entity types. - Make
dependentKeys
inGraphQLResult
public. (#758): MakingdependentKeys
public allows for implementing customApolloStoreSubscribers
similar toGraphQLQueryWatcher
. Without this it's extremely difficult to know when to react to cache changes for a query. _Thank you to @chrsmys for the contribution.
Fixed
- Duplicate deferred fragment identifiers. (#700): The deferred fragment identifier was being generated using all elements in the deferred fragments path type info array. While the contents of that array are correct because of the unique selection sets, the identifier is able to be shared amongst elements with the same path and defer condition. Taking this into account the identifiers are now generated without duplicates.
- Fix generated default mock initializer for lowercase type names. (#712): Type name in mock initializer of a type with a lowercase name was being inadvertently captialized. Thank you to @dwroth for the contribution.
- Deferred fragment accessor with nested fragment. (#709): The selection set template would correctly produce a fragment accessor property for merged deferred fragments but the initializer was missing.
- Change
clientVersion
build delimiter. (#721): This changes the version/build delimiter from a-
to a+
. This now matches the semver specification of that additional metadata.