2.5.3
2.5.3
Bug Fixes
- Fixed an infinite loop caused by using
setState
in the
onError
/onCompleted
callbacks of theQuery
component.
@chenesan in #2751 - Fixed an issue that prevented good results from showing up in a
Query
component, after an error was received, variables were adjusted, and then
the good data was fetched.
@MerzDaniel in #2718 - Fixed an issue that prevented
Query
component updates from firing (under
certain circumstances) due to the internallastResult
value (that's used
to help prevent unnecessary re-renders) not being updated.
@Glennrs in #2840
Improvements
-
MockedProvider
now accepts achildProps
prop that can be used to pass
props down to a child component.
@miachenmtl in #2482 -
onCompleted
callbacks now use a destructuring-friendly type definition.
@jozanza in #2496 -
@connection
directives are now properly stripped fromMockedResponse
's,
when usingMockedProvider
.
@ajmath in #2523 -
MockedProvider
has been updated to stop setting a defaultresolvers
value of{}
, which means by default Apollo Client 2.5 local resolver
functionality is not enabled when mocking withMockedProvider
. This allows
@client
fields to be passed through the mocked link chain, like people
were used to before AC 2.5. When using this default mode you will see a
dev only warning message about this like:Found @client directives in query but no client resolvers were specified.
You can now pass apollo-link-state resolvers to the ApolloClient
constructor.This message can be safely ignored. If you want to use
MockedProvider
with AC 2.5's new local resolver functionality, you can pass your local
resolver map into theMockedProvider
resolvers
prop.
@ajmath in #2524 -
Improvements to the
graphql
HOC generics forfetchMore
andrefetch
.
@EricMcRay in #2525 -
The
ApolloProvider
/ApolloConsumer
implementations have been refactored
to use React 16.3's new context API.
@wzrdzl in #2540 -
All
dependencies
anddevDependencies
have been updated to their latest
versions, and related Typescript changes have been applied.
@hwillson in #2873