Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

2.5.3

Compare
Choose a tag to compare
@hwillson hwillson released this 25 Mar 01:01
· 810 commits to master since this release

2.5.3

Bug Fixes

  • Fixed an infinite loop caused by using setState in the
    onError / onCompleted callbacks of the Query 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 internal lastResult value (that's used
    to help prevent unnecessary re-renders) not being updated.
    @Glennrs in #2840

Improvements

  • MockedProvider now accepts a childProps 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 from MockedResponse's,
    when using MockedProvider.
    @ajmath in #2523

  • MockedProvider has been updated to stop setting a default resolvers
    value of {}, which means by default Apollo Client 2.5 local resolver
    functionality is not enabled when mocking with MockedProvider. 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 the MockedProvider resolvers prop.
    @ajmath in #2524

  • Improvements to the graphql HOC generics for fetchMore and refetch.
    @EricMcRay in #2525

  • The ApolloProvider / ApolloConsumer implementations have been refactored
    to use React 16.3's new context API.
    @wzrdzl in #2540

  • All dependencies and devDependencies have been updated to their latest
    versions, and related Typescript changes have been applied.
    @hwillson in #2873