I had no problems using the approach above with apollo-client@2.6.8, but after the migration to @apollo/client@3.0-beta the mock only matches the query when removing @client or adding the __typename field. So I guess it has something to do with the addTypename prop.
I think the above explanation should make the problem clear and reproducible. If I find time (and if needed), I can also try to set up a repository to reproduce the problem.
Intended outcome:
The following query should match with the provided mock when testing a component that queries the local state using the
@client
directive:Actual outcome:
I had no problems using the approach above with
apollo-client@2.6.8
, but after the migration to@apollo/client@3.0-beta
the mock only matches the query when removing@client
or adding the__typename
field. So I guess it has something to do with theaddTypename
prop.How to reproduce the issue:
I think the above explanation should make the problem clear and reproducible. If I find time (and if needed), I can also try to set up a repository to reproduce the problem.
Versions
OS: macOS 10.15.3
Node: 10.16.3 npm: 6.9.0
@apollo/client: 3.0.0-beta.38 @apollo/link-error: 2.0.0-beta.3 @apollo/react-ssr: 4.0.0-beta.1 next-with-apollo: 5.0.0