Description
I have a query somewhat with the following structure:
query TestQuery {
authenticatedUser {
...UserFragment
company {
users {
...UserFragment
}
}
}
}
fragment UserFragment on User {
firstName
company {
id
}
}
If the same company (same id) is returned both under authenticatedUser > company
and authenticatedUser > company > users > company
, it seems like the same object instance is returned from apollo-cache-inmemory. This has all sorts of implications, not least as it can lead to the resulting object having a cyclic nature making Apollo cause a RangeError when using isEqual
.
I suspect this is because in the above example the company selection set is cached (with users) and thus not evaluated correctly for authenticatedUser > company > users > company
(without users). Maybe @benjamn can confirm this?
Versions
System:
OS: macOS High Sierra 10.13.6
Binaries:
Node: 8.11.4 - /usr/local/bin/node
Yarn: 1.10.1 - /usr/local/bin/yarn
npm: 5.6.0 - /usr/local/bin/npm
Browsers:
Chrome: 70.0.3538.77
Safari: 12.0
npmPackages:
apollo-cache-inmemory: 1.3.7 => 1.3.7
apollo-client: 2.4.5 => 2.4.5
apollo-link-batch-http: 1.2.3 => 1.2.3
react-apollo: 2.2.4 => 2.2.4
npmGlobalPackages:
apollo-codegen: 0.10.5
Activity