SurveyMonkey / graphql-ergonomock

Automatic mocking of GraphQL queries
MIT License
19 stars 5 forks source link

chore(deps): update dependency @apollo/client to v3.3.11 #77

Closed renovate[bot] closed 3 years ago

renovate[bot] commented 3 years ago

WhiteSource Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@apollo/client (source) 3.2.2 -> 3.3.11 age adoption passing confidence

Release Notes

apollographql/apollo-client ### [`v3.3.11`](https://togithub.com/apollographql/apollo-client/blob/master/CHANGELOG.md#Apollo-Client-3311) [Compare Source](https://togithub.com/apollographql/apollo-client/compare/v3.3.10...v3.3.11) ##### Bug fixes - Fix `useLazyQuery` `forceUpdate` loop regression introduced by [#​7655](https://togithub.com/apollographql/apollo-client/pull/7655) in version 3.3.10.
[@​benjamn](https://togithub.com/benjamn) in [#​7715](https://togithub.com/apollographql/apollo-client/pull/7715) ### [`v3.3.10`](https://togithub.com/apollographql/apollo-client/blob/master/CHANGELOG.md#Apollo-Client-3310) [Compare Source](https://togithub.com/apollographql/apollo-client/compare/v3.3.9...v3.3.10) ##### Bug fixes - Revert PR [#​7276](https://togithub.com/apollographql/apollo-client/pull/7276), but test that garbage collection reclaims torn-down `ObservableQuery` objects.
[@​benjamn](https://togithub.com/benjamn) in [#​7695](https://togithub.com/apollographql/apollo-client/pull/7695) - Reset `QueryInfo.diff` and `QueryInfo.dirty` after canceling notify timeout in `QueryInfo.markResult` and `QueryInfo.markError`.
[@​jcreighton](https://togithub.com/jcreighton) in [#​7696](https://togithub.com/apollographql/apollo-client/pull/7696) ##### Improvements - Avoid calling `forceUpdate` when component is unmounted.
[@​DylanVann](https://togithub.com/DylanVann) in [#​7655](https://togithub.com/apollographql/apollo-client/pull/7655) - The `codemods/` top-level directory has been moved into the `scripts/` directory.
[@​benjamn](https://togithub.com/benjamn) in [#​7675](https://togithub.com/apollographql/apollo-client/pull/7675) ### [`v3.3.9`](https://togithub.com/apollographql/apollo-client/blob/master/CHANGELOG.md#Apollo-Client-339) [Compare Source](https://togithub.com/apollographql/apollo-client/compare/v3.3.8...v3.3.9) ##### Bug Fixes - Prevent reactive variables from retaining otherwise unreachable `InMemoryCache` objects.
[@​benjamn](https://togithub.com/benjamn) in [#​7661](https://togithub.com/apollographql/apollo-client/pull/7661) ##### Improvements - The [`graphql-tag`](https://www.npmjs.com/package/graphql-tag) dependency has been updated to version 2.12.0, after converting its repository to use TypeScript and ECMAScript module syntax. There should be no visible changes in behavior, though the internal changes seemed significant enough to mention here.
[@​abdonrd](https://togithub.com/abdonrd) in [graphql-tag#​273](https://togithub.com/apollographql/graphql-tag/pull/273) and [@​PowerKiKi](https://togithub.com/PowerKiKi) in [graphql-tag#​325](https://togithub.com/apollographql/graphql-tag/pull/325) ### [`v3.3.8`](https://togithub.com/apollographql/apollo-client/blob/master/CHANGELOG.md#Apollo-Client-338) [Compare Source](https://togithub.com/apollographql/apollo-client/compare/v3.3.7...v3.3.8) ##### Bug Fixes - Catch updates in `useReactiveVar` with an additional check.
[@​jcreighton](https://togithub.com/jcreighton) in [#​7652](https://togithub.com/apollographql/apollo-client/pull/7652) - Reactivate forgotten reactive variables whenever `InMemoryCache` acquires its first watcher.
[@​benjamn](https://togithub.com/benjamn) in [#​7657](https://togithub.com/apollographql/apollo-client/pull/7657) - Backport `Symbol.species` fix for `Concast` and `ObservableQuery` from [`release-3.4`](https://togithub.com/apollographql/apollo-client/pull/7399), fixing subscriptions in React Native Android when the Hermes JavaScript engine is enabled (among other benefits).
[@​benjamn](https://togithub.com/benjamn) in [#​7403](https://togithub.com/apollographql/apollo-client/pull/7403) and [#​7660](https://togithub.com/apollographql/apollo-client/pull/7660) ### [`v3.3.7`](https://togithub.com/apollographql/apollo-client/blob/master/CHANGELOG.md#Apollo-Client-337) [Compare Source](https://togithub.com/apollographql/apollo-client/compare/v3.3.6...v3.3.7) ##### Bug Fixes - Fix a regression due to [#​7310](https://togithub.com/apollographql/apollo-client/pull/7310) that caused `loading` always to be `true` for `skip: true` results during server-side rendering.
[@​rgrove](https://togithub.com/rgrove) in [#​7567](https://togithub.com/apollographql/apollo-client/pull/7567) - Avoid duplicate `useReactiveVar` listeners when rendering in `React.StrictMode`.
[@​jcreighton](https://togithub.com/jcreighton) in [#​7581](https://togithub.com/apollographql/apollo-client/pull/7581) ##### Improvements - Set `displayName` on `ApolloContext` objects for easier debugging.
[@​dulmandakh](https://togithub.com/dulmandakh) in [#​7550](https://togithub.com/apollographql/apollo-client/pull/7550) ### [`v3.3.6`](https://togithub.com/apollographql/apollo-client/blob/master/CHANGELOG.md#Apollo-Client-336) [Compare Source](https://togithub.com/apollographql/apollo-client/compare/v3.3.5...v3.3.6) ##### Bug Fixes - Immediately apply `queryType: true`, `mutationType: true`, and `subscriptionType: true` type policies, rather than waiting for the first time the policy is used, fixing a [regression](https://togithub.com/apollographql/apollo-client/issues/7443) introduced by [#​7065](https://togithub.com/apollographql/apollo-client/pull/7065).
[@​benjamn](https://togithub.com/benjamn) in [#​7463](https://togithub.com/apollographql/apollo-client/pull/7463) - Check that `window` is defined even when `connectToDevTools` is `true`.
[@​yasupeke](https://togithub.com/yasupeke) in [#​7434](https://togithub.com/apollographql/apollo-client/pull/7434) ##### Improvements - Replace stray `console.debug` (undefined in React Native) with `invariant.log`.
[@​benjamn](https://togithub.com/benjamn) in [#​7454](https://togithub.com/apollographql/apollo-client/pull/7454) - Suggest Firefox Apollo DevTools as well as the Chrome extension.
[@​benjamn](https://togithub.com/benjamn) in [#​7461](https://togithub.com/apollographql/apollo-client/pull/7461) ### [`v3.3.5`](https://togithub.com/apollographql/apollo-client/blob/master/CHANGELOG.md#Apollo-Client-335) [Compare Source](https://togithub.com/apollographql/apollo-client/compare/v3.3.4...v3.3.5) ##### Improvements - Restore `client.version` property, reflecting the current `@apollo/client` version from `package.json`.
[@​benjamn](https://togithub.com/benjamn) in [#​7448](https://togithub.com/apollographql/apollo-client/pull/7448) ### [`v3.3.4`](https://togithub.com/apollographql/apollo-client/blob/master/CHANGELOG.md#Apollo-Client-334) [Compare Source](https://togithub.com/apollographql/apollo-client/compare/v3.3.3...v3.3.4) ##### Improvements - Update `ts-invariant` to avoid potential [Content Security Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP)-violating `Function` fallback, thanks to [a clever new `globalThis` polyfill technique](https://mathiasbynens.be/notes/globalthis).
[@​benjamn](https://togithub.com/benjamn) in [#​7414](https://togithub.com/apollographql/apollo-client/pull/7414) ### [`v3.3.3`](https://togithub.com/apollographql/apollo-client/blob/master/CHANGELOG.md#Apollo-Client-333) [Compare Source](https://togithub.com/apollographql/apollo-client/compare/v3.3.2...v3.3.3) ##### Bug fixes - Make the `observer` parameter of `ApolloLink#onError` optional, fixing an unnecessary breaking change for any code that called `onError` directly.
[@​benjamn](https://togithub.com/benjamn) in [#​7407](https://togithub.com/apollographql/apollo-client/pull/7407) ### [`v3.3.2`](https://togithub.com/apollographql/apollo-client/blob/master/CHANGELOG.md#Apollo-Client-332) [Compare Source](https://togithub.com/apollographql/apollo-client/compare/v3.3.1...v3.3.2) > ⚠️ **Note:** This version of `@apollo/client` contains no behavioral changes since version 3.3.1 > > ##### Documentation - The [Pagination](https://www.apollographql.com/docs/react/pagination/overview/) article has been completely rewritten (and split into multiple pages) to cover Apollo Client 3 field policies.
[@​benjamn](https://togithub.com/benjamn) and [@​StephenBarlow](https://togithub.com/StephenBarlow) in [#​7175](https://togithub.com/apollographql/apollo-client/pull/7175) - Revamp [local state tutorial chapter](https://www.apollographql.com/docs/tutorial/local-state/) for Apollo Client 3, including reactive variables.
[@​StephenBarlow](https://togithub.com/StephenBarlow) in [`apollographql@apollo#​1050`](https://togithub.com/apollographql/apollo/pull/1050) - Add examples of using `ApolloLink` to modify response data asynchronously.
[@​alichry](https://togithub.com/alichry) in [#​7332](https://togithub.com/apollographql/apollo-client/pull/7332) - Consolidate separate v2.4, v2.5, and v2.6 documentation versions into one v2 version.
[@​jgarrow](https://togithub.com/jgarrow) in [#​7378](https://togithub.com/apollographql/apollo-client/pull/7378) ### [`v3.3.1`](https://togithub.com/apollographql/apollo-client/blob/master/CHANGELOG.md#Apollo-Client-3311) [Compare Source](https://togithub.com/apollographql/apollo-client/compare/v3.3.0...v3.3.1) ##### Bug fixes - Fix `useLazyQuery` `forceUpdate` loop regression introduced by [#​7655](https://togithub.com/apollographql/apollo-client/pull/7655) in version 3.3.10.
[@​benjamn](https://togithub.com/benjamn) in [#​7715](https://togithub.com/apollographql/apollo-client/pull/7715) ### [`v3.3.0`](https://togithub.com/apollographql/apollo-client/blob/master/CHANGELOG.md#Apollo-Client-330) [Compare Source](https://togithub.com/apollographql/apollo-client/compare/v3.2.9...v3.3.0) ##### Bug Fixes - Update `@wry/equality` to consider undefined properties equivalent to missing properties.
[@​benjamn](https://togithub.com/benjamn) in [#​7108](https://togithub.com/apollographql/apollo-client/pull/7108) - Prevent memory leaks involving unused `onBroadcast` function closure created in `ApolloClient` constructor.
[@​kamilkisiela](https://togithub.com/kamilkisiela) in [#​7161](https://togithub.com/apollographql/apollo-client/pull/7161) - Provide default empty cache object for root IDs like `ROOT_QUERY`, to avoid differences in behavior before/after `ROOT_QUERY` data has been written into `InMemoryCache`.
[@​benjamn](https://togithub.com/benjamn) in [#​7100](https://togithub.com/apollographql/apollo-client/pull/7100) - Cancel `queryInfo.notifyTimeout` in `QueryInfo#markResult` to prevent unnecessary network requests when using a `FetchPolicy` of `cache-and-network` or `network-only` in a React component with multiple `useQuery` calls.
[@​benjamn](https://togithub.com/benjamn) in [#​7347](https://togithub.com/apollographql/apollo-client/pull/7347) ##### Potentially breaking changes - Ensure `cache.readQuery` and `cache.readFragment` always return `TData | null`, instead of throwing `MissingFieldError` exceptions when missing fields are encountered.
[@​benjamn](https://togithub.com/benjamn) in [#​7098](https://togithub.com/apollographql/apollo-client/pull/7098) > Since this change converts prior exceptions to `null` returns, and since `null` was already a possible return value according to the `TData | null` return type, we are confident this change will be backwards compatible (as long as `null` was properly handled before). - `HttpLink` will now automatically strip any unused `variables` before sending queries to the GraphQL server, since those queries are very likely to fail validation, according to the [All Variables Used](https://spec.graphql.org/draft/#sec-All-Variables-Used) rule in the GraphQL specification. If you depend on the preservation of unused variables, you can restore the previous behavior by passing `includeUnusedVariables: true` to the `HttpLink` constructor (which is typically passed as `options.link` to the `ApolloClient` constructor).
[@​benjamn](https://togithub.com/benjamn) in [#​7127](https://togithub.com/apollographql/apollo-client/pull/7127) - Ensure `MockLink` (used by `MockedProvider`) returns mock configuration errors (e.g. `No more mocked responses for the query ...`) through the Link's `Observable`, instead of throwing them. These errors are now available through the `error` property of a result.
[@​hwillson](https://togithub.com/hwillson) in [#​7110](https://togithub.com/apollographql/apollo-client/pull/7110) > Returning mock configuration errors through the Link's `Observable` was the default behavior in Apollo Client 2.x. We changed it for 3, but the change has been problematic for those looking to migrate from 2.x to 3. We've decided to change this back with the understanding that not many people want or are relying on `MockLink`'s throwing exception approach. If you want to change this functionality, you can define custom error handling through `MockLink.setOnError`. - Unsubscribing the last observer from an `ObservableQuery` will once again unsubscribe from the underlying network `Observable` in all cases, as in Apollo Client 2.x, allowing network requests to be cancelled by unsubscribing.
[@​javier-garcia-meteologica](https://togithub.com/javier-garcia-meteologica) in [#​7165](https://togithub.com/apollographql/apollo-client/pull/7165) and [#​7170](https://togithub.com/apollographql/apollo-client/pull/7170). - The independent `QueryBaseOptions` and `ModifiableWatchQueryOptions` interface supertypes have been eliminated, and their fields are now defined by `QueryOptions`.
[@​DCtheTall](https://togithub.com/DCtheTall) in [#​7136](https://togithub.com/apollographql/apollo-client/pull/7136) - Internally, Apollo Client now avoids nested imports from the `graphql` package, importing everything from the top-level package instead. For example, ```ts import { visit } from "graphql/language/visitor" ``` is now just ```ts import { visit } from "graphql" ``` Since the `graphql` package uses `.mjs` modules, your bundler may need to be configured to recognize `.mjs` files as ECMAScript modules rather than CommonJS modules.
[@​benjamn](https://togithub.com/benjamn) in [#​7185](https://togithub.com/apollographql/apollo-client/pull/7185) ##### Improvements - Support inheritance of type and field policies, according to `possibleTypes`.
[@​benjamn](https://togithub.com/benjamn) in [#​7065](https://togithub.com/apollographql/apollo-client/pull/7065) - Allow configuring custom `merge` functions, including the `merge: true` and `merge: false` shorthands, in type policies as well as field policies.
[@​benjamn](https://togithub.com/benjamn) in [#​7070](https://togithub.com/apollographql/apollo-client/pull/7070) - The verbosity of Apollo Client console messages can be globally adjusted using the `setLogVerbosity` function: ```ts import { setLogVerbosity } from "@​apollo/client"; setLogVerbosity("log"); // display all messages setLogVerbosity("warn"); // display only warnings and errors (default) setLogVerbosity("error"); // display only errors setLogVerbosity("silent"); // hide all console messages ``` Remember that all logs, warnings, and errors are hidden in production.
[@​benjamn](https://togithub.com/benjamn) in [#​7226](https://togithub.com/apollographql/apollo-client/pull/7226) - Modifying `InMemoryCache` fields that have `keyArgs` configured will now invalidate only the field value with matching key arguments, rather than invalidating all field values that share the same field name. If `keyArgs` has not been configured, the cache must err on the side of invalidating by field name, as before.
[@​benjamn](https://togithub.com/benjamn) in [#​7351](https://togithub.com/apollographql/apollo-client/pull/7351) - Shallow-merge `options.variables` when combining existing or default options with newly-provided options, so new variables do not completely overwrite existing variables.
[@​amannn](https://togithub.com/amannn) in [#​6927](https://togithub.com/apollographql/apollo-client/pull/6927) - Avoid displaying `Cache data may be lost...` warnings for scalar field values that happen to be objects, such as JSON data.
[@​benjamn](https://togithub.com/benjamn) in [#​7075](https://togithub.com/apollographql/apollo-client/pull/7075) - In addition to the `result.data` property, `useQuery` and `useLazyQuery` will now provide a `result.previousData` property, which can be useful when a network request is pending and `result.data` is undefined, since `result.previousData` can be rendered instead of rendering an empty/loading state.
[@​hwillson](https://togithub.com/hwillson) in [#​7082](https://togithub.com/apollographql/apollo-client/pull/7082) - Passing `validate: true` to the `SchemaLink` constructor will enable validation of incoming queries against the local schema before execution, returning validation errors in `result.errors`, just like a non-local GraphQL endpoint typically would.
[@​amannn](https://togithub.com/amannn) in [#​7094](https://togithub.com/apollographql/apollo-client/pull/7094) - Allow optional arguments in `keyArgs: [...]` arrays for `InMemoryCache` field policies.
[@​benjamn](https://togithub.com/benjamn) in [#​7109](https://togithub.com/apollographql/apollo-client/pull/7109) - Avoid registering `QueryPromise` when `skip` is `true` during server-side rendering.
[@​izumin5210](https://togithub.com/izumin5210) in [#​7310](https://togithub.com/apollographql/apollo-client/pull/7310) - `ApolloCache` objects (including `InMemoryCache`) may now be associated with or disassociated from individual reactive variables by calling `reactiveVar.attachCache(cache)` and/or `reactiveVar.forgetCache(cache)`.
[@​benjamn](https://togithub.com/benjamn) in [#​7350](https://togithub.com/apollographql/apollo-client/pull/7350) ### [`v3.2.9`](https://togithub.com/apollographql/apollo-client/blob/master/CHANGELOG.md#Apollo-Client-329) [Compare Source](https://togithub.com/apollographql/apollo-client/compare/v3.2.8...v3.2.9) ##### Bug Fixes - Revert back to `default`-importing `React` internally, rather than using a namespace import.
[@​benjamn](https://togithub.com/benjamn) in [113475b1](https://togithub.com/apollographql/apollo-client/commit/113475b163a19a40a67465c11e8e6f48a1de7e76) ### [`v3.2.8`](https://togithub.com/apollographql/apollo-client/blob/master/CHANGELOG.md#Apollo-Client-328) [Compare Source](https://togithub.com/apollographql/apollo-client/compare/v3.2.7...v3.2.8) ##### Bug Fixes - Ensure `sourcesContent` array is properly defined in `.js.map` files generated by `tsc`.
[@​benjamn](https://togithub.com/benjamn) in [#​7371](https://togithub.com/apollographql/apollo-client/pull/7371) - Avoid relying on global `Symbol` properties in `ApolloContext.ts`.
[@​benjamn](https://togithub.com/benjamn) in [#​7371](https://togithub.com/apollographql/apollo-client/pull/7371) ### [`v3.2.7`](https://togithub.com/apollographql/apollo-client/blob/master/CHANGELOG.md#Apollo-Client-327) [Compare Source](https://togithub.com/apollographql/apollo-client/compare/v3.2.6...v3.2.7) ##### Bug Fixes - Revert updating `symbol-observable` from version 2.x to version 3, which caused TypeScript errors with some `@types/node` versions, especially in Angular applications.
[@​benjamn](https://togithub.com/benjamn) in [#​7340](https://togithub.com/apollographql/apollo-client/pull/7340) ### [`v3.2.6`](https://togithub.com/apollographql/apollo-client/blob/master/CHANGELOG.md#Apollo-Client-326) [Compare Source](https://togithub.com/apollographql/apollo-client/compare/v3.2.5...v3.2.6) ##### Bug Fixes - Always consider singleton IDs like `ROOT_QUERY` and `ROOT_MUTATION` to be root IDs during `cache.gc` garbage collection, regardless of whether they have been retained or released.
[@​benjamn](https://togithub.com/benjamn) in [#​7333](https://togithub.com/apollographql/apollo-client/pull/7333) - Use optional chaining syntax (`this.currentObservable?.refetch`) in React `refetch` wrapper function to avoid crashing when an unmounted component is accidentally refetched.
[@​tm1000](https://togithub.com/tm1000) in [#​6314](https://togithub.com/apollographql/apollo-client/pull/6314) and [@​linmic](https://togithub.com/linmic) in [#​7186](https://togithub.com/apollographql/apollo-client/pull/7186) ##### Improvements - Handle older `react-apollo` package in `codemods/ac2-to-ac3/imports.js` migration script.
[@​tm1000](https://togithub.com/tm1000) in [#​7216](https://togithub.com/apollographql/apollo-client/pull/7216) - Ensure `relayStylePagination` preserves `pageInfo.{start,end}Cursor` if `edges` is missing or empty.
[@​beaucollins](https://togithub.com/beaucollins) in [#​7224](https://togithub.com/apollographql/apollo-client/pull/7224) ### [`v3.2.5`](https://togithub.com/apollographql/apollo-client/blob/master/CHANGELOG.md#Apollo-Client-325) [Compare Source](https://togithub.com/apollographql/apollo-client/compare/v3.2.4...v3.2.5) ##### Improvements - Move `terser` dependency from `dependencies` to `devDependencies`.
[@​SimenB](https://togithub.com/SimenB) in [#​7188](https://togithub.com/apollographql/apollo-client/pull/7188) - Avoid all sub-package imports from the `graphql` npm package.
[@​stoically](https://togithub.com/stoically) in [#​7185](https://togithub.com/apollographql/apollo-client/pull/7185) ### [`v3.2.4`](https://togithub.com/apollographql/apollo-client/blob/master/CHANGELOG.md#Apollo-Client-324) [Compare Source](https://togithub.com/apollographql/apollo-client/compare/v3.2.3...v3.2.4) ##### Improvements - Update the `optimism` npm dependency to version 0.13.0 in order to use the new `optimistic.forget` method to fix a potential `cache.watch` memory leak.
[@​benjamn](https://togithub.com/benjamn) in [#​7157](https://togithub.com/apollographql/apollo-client/pull/7157) - Consider `cache.reset` a destructive method, like `cache.evict` and `cache.modify`.
[@​joshjg](https://togithub.com/joshjg) in [#​7150](https://togithub.com/apollographql/apollo-client/pull/7150) - Avoid refetching observerless queries with `reFetchObservableQueries`.
[@​joshjg](https://togithub.com/joshjg) in [#​7146](https://togithub.com/apollographql/apollo-client/pull/7146) ### [`v3.2.3`](https://togithub.com/apollographql/apollo-client/blob/master/CHANGELOG.md#Apollo-Client-323) [Compare Source](https://togithub.com/apollographql/apollo-client/compare/v3.2.2...v3.2.3) ##### Improvements - Default `args.offset` to zero in `offsetLimitPagination`.
[@​benjamn](https://togithub.com/benjamn) in [#​7141](https://togithub.com/apollographql/apollo-client/pull/7141)

Renovate configuration

:date: Schedule: At any time (no schedule defined).

:vertical_traffic_light: Automerge: Disabled by config. Please merge this manually once you are satisfied.

:recycle: Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

:no_bell: Ignore: Close this PR and you won't be reminded about this update again.



This PR has been generated by WhiteSource Renovate. View repository job log here.

codecov[bot] commented 3 years ago

Codecov Report

Merging #77 (052b3ba) into master (2e721be) will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #77   +/-   ##
=======================================
  Coverage   99.36%   99.36%           
=======================================
  Files           8        8           
  Lines         158      158           
  Branches       41       41           
=======================================
  Hits          157      157           
  Misses          1        1           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 2e721be...052b3ba. Read the comment docs.

joual commented 3 years ago

:tada: This PR is included in version 1.1.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: