Note: This is a cumulative changelog that outlines all of the Apollo Client project child package changes that were bundled into a specific apollo-client
release.
- Internal code formatting updates.
- @chentsulin in #3574
- Documentation updates.
- @andtos90 in #3596
- @serranoarevalo in #3554
- @cooperka in #3594
- @pravdomil in #3587
- @excitement-engineer in #3309
- No changes.
- No changes.
- No changes.
- Removed unnecessary whitespace from error message.
- No changes.
- Export the
QueryOptions
interface, to make sure it can be used by other projects (likeapollo-angular
). - Fixed an issue caused by typescript changes to the constructor
defaultOptions
param, that preventedquery
defaults from passing type checks. (@hwillson in #3585)
- No changes
- No changes
- No changes
- No changes
- No changes
- Typescript improvements. Made observable query parameterized on data and
variables:
ObservableQuery<TData, TVariables>
(@excitement-engineer in #3140) - Added optional generics to cache manipulation methods (typescript). (@mvestergaard in #3541)
- Typescript improvements. Created a new
QueryOptions
interface that
is now used byApolloClient.query
options, instead of the previousWatchQueryOptions
interface. This helps reduce confusion (especially in the docs) that made it look likeApolloClient.query
acceptedApolloClient.watchQuery
only options, likepollingInterval
. (@hwillson in #3569)
- Allow
cache
to be given as a configuration option toApolloBoost
. (@dandean in #3561) - Allow
headers
andcredentials
to be passed in as configuration parameters to theapollo-boost
ApolloClient
constructor. (@rzane in #3098)
- Added optional generics to cache manipulation methods (typescript). (@mvestergaard in #3541)
- Added optional generics to cache manipulation methods (typescript). (@mvestergaard in #3541)
- Restore non-enumerability of
resultFields[ID_KEY]
. (@benjamn in #3544) - Cache query documents transformed by InMemoryCache. (@benjamn in #3553)
- Store key names generated by
getStoreKeyName
now leverage a more deterministic approach to handling JSON based strings. This prevents store key names from differing when usingargs
like{ prop1: 'value1', prop2: 'value2' }
and{ prop2: 'value2', prop1: 'value1' }
. (@gdi2290 in #2869) - Avoid needless
hasOwnProperty
check indeepFreeze
. (@benjamn in #3545)
- No new changes.
- Fix SSR and
cache-and-network
fetch policy (@dastoori in #3372) - Fixed an issue where the
updateQuery
method passed toObservableQuery.fetchMore
was receiving the original query variables, instead of the new variables that it used to fetch more data. (@abhiaiyer91 in #3500) - Fixed an issue involving
Object.setPrototypeOf()
not working on JSC (Android), by instead setting theprototype
ofthis
manually. (@seklyza in #3306) - Added safeguards to make sure
QueryStore.initQuery
and
QueryStore.markQueryResult
don't try to set the network status of afetchMoreForQueryId
query, if it does not exist in the store. This was happening when a query component was unmounted while afetchMore
was still in flight.
(@conrad-vanl in #3367, @doomsower in #3469)
- Various internal code cleanup, tooling and dependency changes.
- Various internal code cleanup, tooling and dependency changes.
- Fixed an issue that caused fragment only queries to sometimes fail. (@abhiaiyer91 in #3507)
- Fixed cache invalidation for inlined mixed types in union fields within arrays. (@dferber90 in #3422)
- Make
maybeDeepFreeze
a little more defensive, by always usingObject.prototype.hasOwnProperty
(to avoid cases where the object being frozen doesn't have its ownhasOwnProperty
). (@jorisroling in #3418) - Remove certain small internal caches to prevent memory leaks when using SSR. (@brunorzn in #3444)