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

version 3.1.4 (and 3.1.5) breaks addMocksToSchema from @graphql-tools/mock #4034

Open
macrozone opened this issue Jul 8, 2020 · 0 comments

Comments

@macrozone
Copy link

with "@apollo/react-hooks": "3.1.4", addMocksToSchema no longer works. The resulting schema won't return any data

Intended outcome:

using addMocksToSchema should make the apollo client returning mock data

Actual outcome:

it does not return any mock data, data is null always

How to reproduce the issue:

use these versions

"@graphql-tools/mock": "^6.0.12",

and

"@apollo/react-hooks": "^3.1.4",

Version

  System:
    OS: macOS 10.15.5
  Binaries:
    Node: 12.13.1 - ~/.nvm/versions/node/v12.13.1/bin/node
    Yarn: 1.21.1 - ~/git/panter/veloplus/veloplus-shop/veloplus-shop-fe/node_modules/.bin/yarn
    npm: 6.12.1 - ~/.nvm/versions/node/v12.13.1/bin/npm
  Browsers:
    Chrome: 83.0.4103.116
    Firefox: 76.0.1
    Safari: 13.1.1
  npmPackages:
    @apollo/react-hooks: 3.1.4 => 3.1.4 
    @apollo/react-ssr: 3.1.4 => 3.1.4 
    apollo: ^2.28.3 => 2.28.3 
    apollo-boost: ^0.4.3 => 0.4.4 
    apollo-cache-inmemory: ^1.6.2 => 1.6.3 
    apollo-link-batch-http: ^1.2.13 => 1.2.13 
    apollo-link-context: ^1.0.17 => 1.0.19 
    apollo-link-error: ^1.1.12 => 1.1.12 
    apollo-link-persisted-queries: ^0.2.2 => 0.2.2 
    apollo-link-schema: ^1.2.5 => 1.2.5 
    apollo-upload-client: ^12.1.0 => 12.1.0 

additional info

it works with version 3.1.3. so fixing the version is the current resolution.

version 3.1.4 and above are lacking a changelog, so its hard to say if there is a reason for this bug.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant