Skip to content

Latest commit

 

History

History
818 lines (591 loc) · 37.8 KB

CHANGELOG.md

File metadata and controls

818 lines (591 loc) · 37.8 KB

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.

Apollo Client (vNext)

Apollo Client (vNext)

Apollo Client (2.4.12)

Apollo Client (2.4.12)

  • Support ApolloClient#stop method for safe client disposal.
    PR #4336

Apollo Client (2.4.11)

  • Added explicit dependencies on the tslib package to all client packages to fix Issue #4332.

Apollo Client (2.4.11)

  • Reverted some breaking changes accidentally released in a patch version (2.4.10). PR #4334

Apollo Client (2.4.10)

Apollo Client (2.4.10)

  • The apollo-client package no longer exports a printAST function from graphql/language/printer. If you need this functionality, import it directly: import { print } from "graphql/language/printer"

  • Query polling now uses a simpler scheduling strategy based on a single setTimeout interval rather than multiple setInterval timers. The new timer fires at the rate of the fastest polling interval, and queries with longer polling intervals fire whenever the time elapsed since they last fired exceeds their desired interval.
    PR #4243

Apollo Cache In-Memory (1.4.1)

  • The optimism npm package has been updated to a version (0.6.9) that provides its own TypeScript declarations, which should fix problems like Issue #4327.
    PR #4331

  • Error messages involving GraphQL queries now print the queries using JSON.stringify instead of the print function exported by the graphql package, to avoid pulling unnecessary printing logic into your JavaScript bundle.
    PR #4234

  • The QueryKeyMaker abstraction has been removed, meaning that cache results for non-identical queries (or sub-queries) with equivalent structure will no longer be cached together. This feature was a nice optimization in certain specific use cases, but it was not worth the additional complexity or bundle size.
    PR #4245

Apollo Utilities (1.1.1)

  • The flattenSelections helper function is no longer exported from apollo-utilities, since getDirectiveNames has been reimplemented without using flattenSelections, and flattenSelections has no clear purpose now. If you need the old functionality, use a visitor:
    import { visit } from "graphql/language/visitor";
    
    function flattenSelections(selection: SelectionNode) {
      const selections: SelectionNode[] = [];
      visit(selection, {
        SelectionSet(ss) {
          selections.push(...ss.selections);
        }
      });
      return selections;
    }

Apollo Client (2.4.9)

Apollo Client (2.4.9)

Apollo Utilities (1.1.0)

  • Transformation utilities have been refactored to work with graphql 14.x. GraphQL AST's are no longer being directly modified.
    @hwillson in #4233

Apollo Cache In-Memory (1.4.0)

  • The speed and memory usage of optimistic reads and writes has been improved dramatically using a new layering technique that does not require copying the non-optimistic contents of the cache.
    PR #4319

  • The RecordingCache abstraction has been removed, and thus is no longer exported from apollo-cache-inmemory.
    PR #4319

  • Export the optimism wrap function using ES2015 export syntax, instead of CommonJS.
    @ardatan in #4158

Apollo Client (2.4.8)

Apollo Client (2.4.8)

Apollo Cache In-Memory (1.3.12)

  • Avoid using DepTrackingCache for optimistic reads. PR #4521

  • When creating an InMemoryCache object, it's now possible to disable the result caching behavior introduced in #3394, either for diagnostic purposes or because the benefit of caching repeated reads is not worth the extra memory usage in your application:

    new InMemoryCache({
      resultCaching: false
    })

    Part of PR #4521.

Apollo Client (2.4.7)

Apollo Client (2.4.7)

  • The ApolloClient constructor has been updated to accept name and version params, that can be used to support Apollo Server Client Awareness functionality. These client awareness properties are passed into the defined Apollo Link chain, and are then ultimately sent out as custom headers with outgoing requests.
    @hwillson in #4154

Apollo Boost (0.1.22)

  • No changes.

Apollo Cache (1.1.21)

  • No changes.

Apollo Cache In-Memory (1.3.11)

  • No changes.

Apollo Utilities (1.0.26)

  • No changes.

Graphql Anywhere (4.1.23)

  • No changes.

Apollo Client (2.4.6)

Apollo Cache In-Memory (1.3.10)

  • Added some returns to prevent errors with noImplicitReturns TypeScript rule. PR #4137

  • Exclude the src/ directory when publishing apollo-cache-inmemory. Issue #4083

Apollo Client (2.4.5)

Apollo Cache (1.1.20)

Apollo Cache In-Memory (1.3.9)

Apollo Utilities (1.0.25)

  • Fix apollo-utilities isEqual bug due to missing hasOwnProperty check. PR #4072 by @samkline

Apollo Client (2.4.4)

Apollo Utilities (1.0.24)

  • Discard property accessor functions in cloneDeep helper, to fix issue #4034.

  • Unconditionally remove cloneDeep property accessors. PR #4039

  • Avoid copying non-enumerable and/or Symbol keys in cloneDeep. PR #4052

Apollo Cache In-Memory (1.3.7)

Apollo Client (2.4.3)

Apollo Cache In-Memory (1.3.6)

  • Optimize repeated apollo-cache-inmemory reads by caching partial query results, for substantial performance improvements. As a consequence, watched queries will not be rebroadcast unless the data have changed. PR #3394

  • Include root ID and fragment matcher function in cache keys computed by StoreReader#executeStoreQuery and executeSelectionSet, and work around bugs in the React Native Map and Set polyfills. PR #3964 React Native PR #21492 (pending)

  • The apollo-cache-inmemory package now allows graphql@^14.0.0 as a peer dependency. Issue #3978

  • The apollo-cache-inmemory package now correctly broadcasts changes even when the new data is === to the old data, since the contents of the data object may have changed. Issue #3992 PR #4032

Apollo GraphQL Anywhere (4.1.20)

Apollo Utilities (1.0.22)

  • The fclone package has been replaced with a custom cloneDeep implementation that is tolerant of cycles, symbol properties, and non-enumerable properties. PR #4032

Apollo Boost (0.1.17)

Apollo Cache (1.1.18)

  • No changes.

Apollo Client (2.4.2)

Apollo Client (2.4.2)

  • Apollo Client no longer deep freezes query results. @hwillson in #3883
  • A new clearStore method has been added, that will remove all data from the store. Unlike resetStore, it will not refetch active queries after removing store data. @hwillson in #3885

Apollo Utilities (1.0.21)

  • Replace the custom cloneDeep implementation with fclone, to avoid crashing when encountering circular references.
    @hwillson in #3881

Apollo Boost (0.1.16)

  • No changes.

Apollo Cache (1.1.17)

  • No changes.

Apollo Cache In-Memory (1.2.10)

  • No changes.

Apollo GraphQL Anywhere (4.1.19)

  • No changes.

2.4.1 (August 26, 2018)

Apollo Client (2.4.1)

  • mutate's refetchQueries option now allows queries to include a custom context option. This context will be used when refetching the query. For example:

    context = {
      headers: {
        token: 'some auth token',
      },
    };
    client.mutate({
      mutation: UPDATE_CUSTOMER_MUTATION,
      variables: {
        userId: user.id,
        firstName,
        ...
      },
      refetchQueries: [{
        query: CUSTOMER_MESSAGES_QUERY,
        variables: { userId: user.id },
        context,
      }],
      context,
    });

    The CUSTOMER_MESSAGES_QUERY above will be refetched using context. Normally queries are refetched using the original context they were first started with, but this provides a way to override the context, if needed.
    @hwillson in #3852

  • Documentation updates.
    @hwillson in #3841

Apollo Boost (0.1.15)

  • Various internal infrastructure changes related to building, bundling, testing, etc. @hwillson in #3817

Apollo Cache (1.1.16)

  • Various internal infrastructure changes related to building, bundling, testing, etc. @hwillson in #3817

Apollo Cache In-Memory (1.2.9)

  • Various internal infrastructure changes related to building, bundling, testing, etc. @hwillson in #3817

Apollo Utilities (1.0.20)

  • Various internal infrastructure changes related to building, bundling, testing, etc. @hwillson in #3817

Apollo GraphQL Anywhere (4.1.18)

  • Various internal infrastructure changes related to building, bundling, testing, etc. @hwillson in #3817

2.4.0 (August 17, 2018)

Apollo Client (2.4.0)

  • Add proper error handling for subscriptions. If you have defined an error handler on your subscription observer, it will now be called when an error comes back in a result, and the next handler will be skipped (similar to how we're handling errors with mutations). Previously, the error was just passed in the result to the next handler. If you don't have an error handler defined, the previous functionality is maintained, meaning the error is passed in the result, giving the next handler a chance to deal with it. This should help address backwards compatibility (and is the reason for the minor version bumo in this release).
    @clayne11 in #3800
  • Allow an optimistic param to be passed into ApolloClient.readQuery and ApolloClient.readFragment, that when set to true, will allow optimistic results to be returned. Is false by default.
    @jay1337 in #2429
  • Optimistic tests cleanup.
    @joshribakoff in #3713
  • Make sure each package has its own .npmignore, so they're taken into consideration when publishing via lerna.
    @hwillson in #3828
  • Documentation updates.
    @toolness in #3804
    @pungggi in #3798
    @lorensr in #3748
    @joshribakoff in #3730
    @yalamber in #3819
    @pschreibs85 in #3812
    @msreekm in #3808
    @kamaltmo in #3806
    @lorensr in #3739
    @brainkim in #3680

Apollo Cache In-Memory (1.2.8)

  • Fix typo in console.warn regarding fragment matching error message.
    @combizs in #3701

Apollo Boost (0.1.14)

  • No changes.

Apollo Cache (1.1.15)

  • No changes.

Apollo Utilities (1.0.19)

  • No changes.

Apollo GraphQL Anywhere (4.1.17)

  • No changes.

2.3.8 (August 9, 2018)

Apollo Client (2.3.8)

Apollo Boost (0.1.13)

  • No changes.

Apollo Cache In-Memory (1.2.7)

  • No changes.

Apollo Cache (1.1.14)

  • No changes.

Apollo Utilities (1.0.18)

  • No changes.

Apollo GraphQL Anywhere (4.1.16)

  • No changes.

2.3.7 (July 24, 2018)

Apollo Client (2.3.7)

  • Release 2.3.6 broke Typescript compilation. QueryManager's getQueryWithPreviousResult method included an invalid variables return type in the auto-generated core/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

Apollo Boost (0.1.12)

  • No changes.

2.3.6 (July 24, 2018)

Apollo Client (2.3.6)

Apollo Boost (0.1.11)

  • Allow fetch to be given as a configuration option to ApolloBoost.
    @mbaranovski in #3590
  • The apollo-boost ApolloClient constructor now warns about unsupported options.
    @quentin- in #3551

Apollo Cache (1.1.13)

  • No changes.

Apollo Cache In-Memory (1.2.6)

  • Add __typename and id properties to dataIdFromObject 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

Apollo Utilities (1.0.17)

  • No changes.

Apollo GraphQL Anywhere (4.1.15)

  • 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

2.3.5 (June 19, 2018)

Apollo Client (2.3.5)

Apollo Boost (0.1.10)

  • No changes.

Apollo Cache (1.1.12)

  • No changes.

Apollo Cache In-Memory (1.2.5)

  • No changes.

Apollo Utilities (1.0.16)

Apollo GraphQL Anywhere (4.1.14)

  • No changes.

2.3.4 (June 13, 2018)

Apollo Client (2.3.4)

  • Export the QueryOptions interface, to make sure it can be used by other projects (like apollo-angular).
  • Fixed an issue caused by typescript changes to the constructor defaultOptions param, that prevented query defaults from passing type checks. (@hwillson in #3585)

Apollo Boost (0.1.9)

  • No changes

Apollo Cache (1.1.11)

  • No changes

Apollo Cache In-Memory (1.2.4)

  • No changes

Apollo Utilities (1.0.15)

  • No changes

Apollo GraphQL Anywhere (4.1.13)

  • No changes

2.3.3 (June 13, 2018)

Apollo Client (2.3.3)

  • 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 by ApolloClient.query options, instead of the previous WatchQueryOptions interface. This helps reduce confusion (especially in the docs) that made it look like ApolloClient.query accepted ApolloClient.watchQuery only options, like pollingInterval. (@hwillson in #3569)

Apollo Boost (0.1.8)

  • Allow cache to be given as a configuration option to ApolloBoost. (@dandean in #3561)
  • Allow headers and credentials to be passed in as configuration parameters to the apollo-boost ApolloClient constructor. (@rzane in #3098)

Apollo Cache (1.1.10)

  • Added optional generics to cache manipulation methods (typescript). (@mvestergaard in #3541)

Apollo Cache In-Memory (1.2.3)

  • 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)

Apollo Utilities (1.0.14)

  • 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 using args like { prop1: 'value1', prop2: 'value2' } and { prop2: 'value2', prop1: 'value1' }. (@gdi2290 in #2869)
  • Avoid needless hasOwnProperty check in deepFreeze. (@benjamn in #3545)

Apollo GraphQL Anywhere (4.1.12)

  • No new changes.

2.3.2 (May 29, 2018)

Apollo Client (2.3.2)

  • Fix SSR and cache-and-network fetch policy (@dastoori in #3372)
  • Fixed an issue where the updateQuery method passed to ObservableQuery.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 the prototype of this manually. (@seklyza in #3306)
  • Added safeguards to make sure QueryStore.initQuery and QueryStore.markQueryResult don't try to set the network status of a fetchMoreForQueryId query, if it does not exist in the store. This was happening when a query component was unmounted while a fetchMore was still in flight. (@conrad-vanl in #3367, @doomsower in #3469)

Apollo Boost (0.1.7)

  • Various internal code cleanup, tooling and dependency changes.

Apollo Cache (1.1.9)

  • Various internal code cleanup, tooling and dependency changes.

Apollo Cache In-Memory (1.2.2)

  • 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)

Apollo Utilities (1.0.13)

  • Make maybeDeepFreeze a little more defensive, by always using Object.prototype.hasOwnProperty (to avoid cases where the object being frozen doesn't have its own hasOwnProperty). (@jorisroling in #3418)
  • Remove certain small internal caches to prevent memory leaks when using SSR. (@brunorzn in #3444)

Apollo GraphQL Anywhere (4.1.11)

  • Source files are now excluded when publishing to npm. (@hwillson in #3454)