This repository has been archived by the owner on Oct 23, 2018. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
2.8.0
->2.10.0
2.0.4
->2.2.4
Release Notes
apollostack/graphql-tag
v2.10.0
Compare Source
v2.9.2
Compare Source
v2.9.1
Compare Source
v2.9.0
Compare Source
experimentalFragmentVariables
compatibility by lucasconstantino in #167apollographql/react-apollo
v2.2.4
Compare Source
Bug Fixes
lodash.isequal
was improperly set as a dev dependency forMockLink
/MockedProvider
. It is now a dependency.@danilobuerger in #2449
Improvements
Subscription
component now accepts afetchPolicy
prop.@MatthieuLemoine in #2298
Typescript
TVariables
generic is passed toObservableQuery
.@tgriesser in #2311
v2.2.3
Compare Source
Bug Fixes
a default
errorPolicy
ofall
.@amacleay in #2374
<Mutation />
refetchQueries
triggered by name (string) will now use the correct variables.@fracmal in #2422
Improvements
lodash
dependency withlodash.flowright
(since that's theonly non-dev
lodash
function we're dependent on). Devlodash
dependencies have also been updated to use their individual module
equivalent.
@hwillson in #2435
rollup-plugin-babel-minify
as it's no longer being used.@hwillson in #2436
getDataFromTree.ts
logic adjustment to avoid unnecessary callswhen a falsy
element
is encountered.@HOUCe in #2429
graphql
14 updates.@hwillson in #2437
latest version of React Apollo.
@hwillson in #2439
Typescript
lodash
typings.@williamboman in #2430
context
toMutationOptions
.@danilobuerger in #2354
MutationOptions
changes/fixes.@danilobuerger in #2340
allowSyntheticDefaultImports
use. Typescript'sallowSyntheticDefaultImports
compiler option is something we'd like tostart using, but we jumped the gun a bit by introducing it in
9a96519
.Including it means that anyone who wants to use Typescript with React
Apollo would have to also include it in their own local
tsconfig.json
, tobe able to handle default imports properly. This is because we're also using
Typescript's
es2015
module
option, which meansallowSyntheticDefaultImports
has to be enabled explicitly. We'veswitched back to using a combination of
import * as X
andrequire
syntax, to work with default imports. We'll re-introduce
allowSyntheticDefaultImports
use in React Apollo 3.@hwillson in #2438
v2.2.2
Compare Source
React.createContext
and SSR, we now make sure the contextprovider value is reset to the previous value it had after its children are
walked.
@mitchellhamilton in #2304
When a query failed on the first result, the query result
data
was beingreturned as
undefined
. This behavior has been changed so thatdata
isreturned as an empty object. This makes checking for data (e.g.
instead of
data && data.user
you can just checkdata.user
) anddestructring (e.g.
{ data: { user } }
) easier. Note: this couldpotentially hurt applications that are relying on a falsey check of
data
to see if any query errors have occurred. A better (and supported) way to
check for errors is to use the result
errors
property.#1983
v2.2.1
Compare Source
Partial<TData>
instead ofTData | {}
, for theQueryResult
data
property."v2.2.0
Deprecated
MutationFunc
in favor ofMutationFn
.Added missing
onCompleted
andonError
callbacks toMutationOpts
.@danilobuerger in #2322
@excitement-engineer in #1998
<Subscription />
component now allows the registration of a callbackfunction, that will be triggered each time the component receives data. The
callback
options
object param consists of the current Apollo Clientinstance in
client
, and the received subscription data insubscriptionData
.@jedwards1211 in #1966
graphql
options
object is no longer mutated, when calculatingvariables from props. This now prevents an issue where components created
with
graphql
were not having their query variables updated properly, whenprops changed.
@ksmth in #1968
data
was beingreturned as
undefined
. This behavior has been changed so thatdata
isreturned as an empty object. This makes checking for data (e.g.
instead of
data && data.user
you can just checkdata.user
) anddestructring (e.g.
{ data: { user } }
) easier. Note: this couldpotentially hurt applications that are relying on a falsey check of
data
to see if any query errors have occurred. A better (and supported) way to
check for errors is to use the result
errors
property.@TLadd in #1983
cache
object to be passed into the test-utilsMockedProvider
.@palmfjord in #2254
MockedProvider
mocks
prop read only.@amacleay in #2284
FetchMoreOptions
andFetchMoreQueryOptions
types, andinstead import them from Apollo Client.
@skovy in #2281
graphql
HOCoptions.skip
property.@jameslaneconkling in #2208
lodash
directly.@shahyar in #2045
Query
skip
prop is set totrue
, make sure the render proploading
param is set tofalse
, since we're not actually loadinganything.
@edorivai in #1916
@hwillson in #2404
<Subscription />
,<Query />
&<Mutation />
all supportusing an Apollo Client instance configured in the
context
or viaprops.
@quentin- in #1956
Partial<TData>
instead ofTData | {}
, for theQueryResult
data
property.@tgriesser in #2313
<Query />
onCompleted
andonError
callbacks to be triggeredvia the
componentDidUpdate
lifecycle method. This ensures these callbackscan be used when data is fetched over the network, and when data is
fetched from the local store (previsouly these callbacks were only being
triggered when data was fetched over the network).
@olistic in #2190
lodash/flowRight
using ES import to allow for treeshaking.@Pajn in #2332
variables
passed ingraphql
HOCoptions
werenot merged with mutation
variables
.@samginn in #2216
partialRefetch
prop (false
by default).When a
Query
component is mounted, and a mutation is executedthat returns the same ID as the mounted
Query
, but has lessfields in its result, Apollo Client's
QueryManager
returns thedata as an empty Object since a hit can't be found in the cache.
This can lead to application errors when the UI elements rendered by
the original
Query
component are expecting certain data values toexist, and they're all of a sudden stripped away. The recommended way to
handle this is to use the mutations
update
prop to reconcile the mutationresult with the data in the cache, getting everything into the expected
state. This can definitely be a cumbersome process however, so to help
address this the
partialRefetch
prop can be used to automaticallyrefetch
the original query and update the cache.@steelbrain in #2003
v2.1.11
getDataFromTree
where queries that threw more than oneerror had error messages swallowed, and returned an invalid error object
with circular references. Multiple errors are now preserved.
@anand-sundaram-zocdoc in #2133
<Mutation />
component andgraphql
HOC to accept a newawaitRefetchQueries
prop (boolean). When set totrue
, queries specifiedin
refetchQueries
will be completed before the mutation itself iscompleted.
awaitRefetchQueries
isfalse
by default, which meansrefetchQueries
are usually completed after the mutation has resolved.Relates to Apollo Client.
PR #3169.
@hwillson in #2214
TData
along intoMutationUpdaterFn
when usingMutationOpts
, to ensure that the updater function is properly typed.@danilobuerger in #2227
@danilobuerger in #2165
v2.1.9
onCompleted
andonError
props to theQuery
component, than canbe used to register callback functions that are to be executed after a
query successfully completes, or an error occurs.
@jeshep in #1922
UNSAFE_componentWillMount
SSR support.@leops in #2152
@danilobuerger in #2151
v2.1.8
v2.1.7
ApolloProvider
children
prop type has been changed fromelement
to
node
, to allow multiple children.@quentin- in #1955
getDerivedStateFromProps
lifecycle method.@amannn in #2076
lodash
is no longer pinned to version 4.17.10.@cherewaty in #1951
apollo-client-preset
withapollo-boost
.@JamesTheHacker in #1925
@DennisKo in #1935
<Query />
example.@petetnt in #2102
v2.1.6
getDataFromTree
to properly traverse React 16.3's context APIprovider/consumer approach.
@marnusw in #1978
ApolloClient
instance can now be passed into aMutation
component via a prop named
client
. This prop will overridean
ApolloClient
instance set viacontext
, by theApolloProvider
component.
@amneacsu in #1890
ApolloClient
instance used by a Mutation is now available in thatMutation's result.
PR #1945
@cooperka in #1945
v2.1.5
apollo-client
2.3.3PR #2105
v2.1.4
__typename
for queries made with MockProvider and MockLinkv2.1.3
v2.1.2
v2.1.1
getDataFromTree
where queries that threw more than oneerror had error messages swallowed, and returned an invalid error object
with circular references. Multiple errors are now preserved.
@anand-sundaram-zocdoc in #2133
<Mutation />
component andgraphql
HOC to accept a newawaitRefetchQueries
prop (boolean). When set totrue
, queries specifiedin
refetchQueries
will be completed before the mutation itself iscompleted.
awaitRefetchQueries
isfalse
by default, which meansrefetchQueries
are usually completed after the mutation has resolved.Relates to Apollo Client.
PR #3169.
@hwillson in #2214
TData
along intoMutationUpdaterFn
when usingMutationOpts
, to ensure that the updater function is properly typed.@danilobuerger in #2227
@danilobuerger in #2165
v2.1.0
Renovate configuration
📅 Schedule: At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻️ Rebasing: Whenever PR becomes conflicted, or if you modify the PR title to begin with "
rebase!
".👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
This PR has been generated by Renovate Bot. View repository job log here.