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.
- Adjusted the
graphql
peer dependency to cover explicit minor ranges. Since the ^ operator only covers any minor version if the major version is not 0 (since a major version of 0 is technically considered development by semver 2), the current ^0.11.0 || ^14.0.0 graphql range doesn't cover 0.12.* or 0.13.*. This fixes theapollo-client@X has incorrect peer dependency "graphql@^0.11.0 || ^14.0.0"
errors that people might have seen usinggraphql
0.12.x or 0.13.x.
@hwillson in #3746 - Document
setVariables
internal API status.
@PowerKiKi in #3692 - Corrected
ApolloClient.queryManager
typing as it may beundefined
.
@danilobuerger in #3661 - Make sure using a
no-cache
fetch policy with subscriptions prevents data from being cached.
@hwillson in #3773 - Fixed an issue that sometimes caused empty query results, when using the
no-cache
fetch policy.
@hwillson in #3777 - Documentation updates.
@hwillson in #3750
@hwillson in #3754
@TheMightyPenguin in #3725
@bennypowers in #3668
@hwillson in #3762
@chentsulin in #3688
@chentsulin in #3687
@ardouglass in #3645
@hwillson in #3764
@hwillson in #3767
@hwillson in #3774
@hwillson in #3779
- Release 2.3.6 broke Typescript compilation.
QueryManager
'sgetQueryWithPreviousResult
method included an invalidvariables
return type in the auto-generatedcore/QueryManager.d.ts
declaration file. The type definition had a locally referenced path, that appears to have been caused by the typescript compiler getting confused at compile/publish time.getQueryWithPreviousResult
return types are now excplicity identified, which helps Typescript avoid the local type reference. For more details, see apollographql#3729.
@hwillson in #3731
- No changes.
- Documentation updates.
@ananth99 in #3599
@hwillson in #3635
@JakeDawkins in #3642
@hwillson in #3644
@gbau in #3644
@chentsulin in #3608
@MikaelCarpenter in #3609
@Gamezpedia in #3612
@jinxac in #3647
@abernix in #3705
@dandv in #3703
@hwillson in #3580 - Updated
graphql
peerDependencies
to handle 14.x versions.
@ivank in #3598 - Add optional generic type params for variables on low level methods.
@mvestergaard in #3588 - Add a new
awaitRefetchQueries
config option to the Apollo Clientmutate
function, that when set totrue
will wait for allrefetchQueries
to be fully refetched, before resolving the mutation call.awaitRefetchQueries
isfalse
by default.
@jzimmek in #3169
- Allow
fetch
to be given as a configuration option toApolloBoost
.
@mbaranovski in #3590 - The
apollo-boost
ApolloClient
constructor now warns about unsupported options.
@quentin- in #3551
- No changes.
- Add
__typename
andid
properties todataIdFromObject
parameter (typescript)
@jfurler in #3641 - Fixed an issue caused by
dataIdFromObject
considering returned 0 values to be falsy, instead of being a valid ID, which lead to the store not being updated properly in some cases.
@hwillson in #3711
- No changes.
- Add support for arrays to
graphql-anywhere
's filter utility.
@jsweet314 in #3591 - Fix
Cannot convert object to primitive value
error that was showing up when attempting to report a missing property on an object.
@benjie in #3618
- 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
andQueryStore.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)