-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When using client directives in part in MockedProvider, it doesn't work. #6402
Comments
+1 i have same issue on 3.0.1 version |
same here |
+1 same issue here |
Replying to this because I found a solution after about 3 hours. Basically you need to provide it with the same type policy schema as your apps root expect where you would normally return your reactive var, you return the desired object/mock. There really needs to be some better documentation around the
|
@JamesDInnes your solution working to me but I don't know if it's a fundamental solution. and break another state test that final state and error state... |
@JamesDInnes Good! Thank you |
We're tracking this in #6711, so we'll close this issue off. Thanks! |
I'm sorry for my poor English.
When using client directives in part in MockedProvider, it doesn't work.
Intended outcome:
It's can be execute without error.
Actual outcome:
Does't work with the following error.
But if add all @client or not add all, it works.
How to reproduce the issue:
https://codesandbox.io/s/competent-black-18fnt
Versions
System:
OS: Windows 10 10.0.18362
Binaries:
Node: 12.16.2 - C:\Program Files\nodejs\node.EXE
npm: 6.14.4 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: 44.18362.449.0
npmPackages:
@apollo/react-testing: 3.1.4 => 3.1.4
apollo-cache-inmemory: 1.6.6 => 1.6.6
apollo-client: 2.6.10 => 2.6.10
react-apollo: 3.1.5 => 3.1.5
The text was updated successfully, but these errors were encountered: