Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

Latest commit

 

History

History
304 lines (158 loc) · 13.3 KB

CHANGELOG.md

File metadata and controls

304 lines (158 loc) · 13.3 KB

Changelog

8.2.1

Patch Changes

  • #2832 e1fd441 Thanks @nattydodd! - MockGraphQLResponse should allow an ExecutionResult containing any data. GraphQL v15 defaulted ExecutionResult's data to be an object containing any keys but v16 narrowed that down to use unknown instead of any. This change explicitly uses the default behaviour of allowing any from v15.

8.2.0

Minor Changes

8.1.0

Minor Changes

8.0.2

Patch Changes

8.0.1

Patch Changes

8.0.0

Major Changes

  • #2755 2fdf9c5d3 Thanks @jas7457! - Change graphQL.resolveAll() to additionally wait for any newly-pending gql calls

7.1.0

Minor Changes

  • #2708 a224c11d7 Thanks @markbann! - - upgrade @apollo/client to the latest (3.8.10)
    • set connectToDevTools to false by default
    • allow consumers to pass defaultOptions into the options of

7.0.1

Patch Changes

7.0.0

Major Changes

  • #2302 96a5023e7 Thanks @vsumner! - Update Apollo from v2 to v3. Replace dependencies on apollo-client, apollo-cache-inmemory and apollo-link with @apollo/client. When updating to Apollo v3, @shopify/graphql-persisted, @shopify/graphql-testing, @shopify/react-graphql and @shopify/react-graphql-universal-provider should all be updated at the same time, and you should follow the Apollo3 migration guide.

    Remove assumeImmutableResults and unionOrIntersectionTypes keys from createGraphQLFactory()'s options, as these concepts no longer exist in Apollo 3. Cache behavior can be controlled by setting values within the cacheOptions key, which is passed to the cache constructor. Use possibleTypes in place of unionOrIntersectionTypes.

    Remove the ability to filter operations using operationName (e.g. graphQL.operations.all({operationName: 'SampleQuery'})). Now operations must be filtered using query or mutation keys.

    Add graphQL.waitForQueryUpdates() method to wait for batched cache updates that occur as of Apollo 3.6.0. This is useful if you need to await on the results of a fetchMore call.

    Remove internal TestingApolloClient - use ApolloClient instead.

    Apollo Change: The task/microtask resolution within Apollo has changed slightly, with some behaviors happening slightly later in the event loop than in Apollo 2. This has no visible effect in the browser, but @shopify/graphql-testing is very sensitive to these changes. To get some tests passing you may require additional task/microtask queue flushes.

Patch Changes

6.5.0

Minor Changes

  • #2543 7c8b83134 Thanks @acmertz! - Update resolveAll() to accept a custom filter option to selectively resolve requests.

6.4.0

Minor Changes

  • #2486 51c0434a9 Thanks @BPScott! - Deliberatly cause a NetworkError with a useful error message if we see a fixture that is a function that returns a function. This can happen if you do createGraphQL({MyQuery: () => fillGraphQL(MyQuery)}) because fillGraphQL returns a function. Apollo 2 already returns a NetworkError if you do this but as it happens later on, the error message was much less helpful.

6.3.0

Minor Changes

  • #2479 1f2f7da72 Thanks @BPScott! - Improve error that is thrown when you test a GraphQL operation that has not been mocked. It now details what mock was absent.

    Calling createGraphQL() with no argument now results in the operation returning a NetworkError. This makes it consistent with the error that results from createGraphQL({}).

6.2.0

Minor Changes

6.1.1

Patch Changes

  • #2389 03c1abc8c Thanks @BPScott! - Add types field to package.json export maps to support typescript consumers that use moduleResolution: "node16"

6.1.0

Minor Changes

6.0.1

Patch Changes

  • #2320 f70a02825 Thanks @vsumner! - Update useQuery refetch so that it can recover from a network error. Add more tests.

6.0.0 - 2022-05-19

Breaking Change

  • Drop support for node 12 and Safari 10, 11 and 12. Remove wildcard export in exports field. [#2277]

5.1.9 - 2022-03-09

Changed

  • Correct wildcard export to ./* [#2209]

5.1.8 - 2022-02-25

Changed

  • Use ./* instead of ./ in package.json exports to fix deprecation warning. [#2184]

5.1.7 - 2022-02-14

Changed

  • Remove devDependency on @shopify/useful-types by using built-in types. [#2163]

5.1.6 - 2022-02-09

  • No updates. Transitive dependency bump.

5.1.5 - 2022-02-01

Changed

  • Rerelease after failed publish. No code changes.

5.1.4 - 2022-02-01

Changed

  • Reorder exports map to prioritize the esnext condition. [#2148]
  • Update Loom build config. [#2150]

5.1.3 - 2021-11-23

  • No updates. Transitive dependency bump.

5.1.2 - 2021-11-22

Changed

  • Fixed babel helpers file being generated with incorrect filename in esm build. [#2082]

5.1.1 - 2021-09-24

Changed

  • Migrate from sewing-kit-next to loom for building - package build output remains identical. [#2039]

5.1.0 - 2021-08-26

Changed

  • Support for graphql@15.x. [#1978]

5.0.6 - 2021-08-24

Changed

  • Added file exclusion for tests to package.json and enable type checking for tests. [#2005]
  • Rename test/ to tests/ [#2005]

5.0.5 - 2021-08-13

Changed

  • Updated build tooling, types are now compiled with TypeScript 4.3. [#1997]

5.0.4 - 2021-08-05

Changed

  • Add matchers entrypoint to typesVersions fields. This should have happened in 5.0.2 but was missed. [#1985]

5.0.3 - 2021-08-04

Changed

  • Ensure tsconfig.tsbuildinfo file is not uploaded to the npm registry. [#1982]

5.0.2 - 2021-08-03

Changed

  • Update to latest sewing-kit-next for build. Update types/typesVersions fields to point directly into the build folder [#1980]

5.0.0 - 2021-05-21

Breaking Change

  • Update minimum supported node version to 12.14.0. Add engines field to help enforce usage of this version. #1906

4.4.4 - 2021-04-13

Changed

  • Removed dependency on tslib, as we no-longer compile with tsc. #1829

4.4.1 - 2021-03-03

Fixed

  • Updated multi-build outputs to include mandatory extensions to fix "Module not found" issues reported by ESM supported bundlers #1759

Changed

  • Update jest-matcher-utils to 26 [#1751]

4.3.0 - 2020-12-18

Added

  • Add new build outputs (CommonJS, ESM, esnext, Node) for greater tree-shakability #1698

4.2.1 - 2020-10-20

  • Added tslib@^1.14.1 in the list of dependencies. #1657

4.2.0 - 2020-06-24

Changed

  • Add subsequential request mocking support (#1534)

4.1.0 - 2020-04-20

Changed

  • Update graphql dependencies [#1379]
  • jest.Matchers type updated to match @types/jest version 25 [#1239]
  • Update jest-matcher-utils to 25 [#1375]

4.0.9 - 2019-12-04

Fixed

  • Adding TestingApolloClient to fix scenarios where some fetchPolicy values produce React events firing outside of an act scope (#1198)

4.0.0 - 2019-07-03

Changed

  • Updated to respect the new asynchronous query components from the 4.x version of @shopify/react-graphql (#762)

3.2.0 - 2019-06-27

Added

  • Allow MockLink to return a full GraphQLError. (#768)

3.1.0 - 2019-05-22

Added

  • Added a new entry point, @shopify/graphql-testing/matchers, which includes a toHavePerformedGraphQLOperation assertion (#706)
  • Improved filtering GraphQL operations by allowing you to pass query or mutation options (#706)

3.0.1 - 2019-04-02

Changed

  • Loosened version requirements for Apollo dependencies

3.0.0 - 2019-04-01

Changed

  • createGraphQLFactory is now a named export, not the default export (#623)
  • Simplified much of the external workings of the library, including removing the custom subclass of ApolloClient (#623)

1.0.0

Initial release.