Skip to content
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

Inconsistent behaviour when specifying possibleTypes #8331

Closed
ramiel opened this issue May 31, 2021 · 0 comments
Closed

Inconsistent behaviour when specifying possibleTypes #8331

ramiel opened this issue May 31, 2021 · 0 comments

Comments

@ramiel
Copy link

ramiel commented May 31, 2021

Intended outcome:
Apollo should decide to crash (or not) when trying to modify the store and a property is missing, in a consistent way. Either it always crashes, either it doesn't.

Actual outcome:
Apollo v3 crashes if I try to modify the store and while doing this I omit some data. The problem is that it crashes only if possibleTypes is defined. The behavior (crashing or not) shoulnd't be related to the presence of possibleTypes or its absence. It's hard to see a correlation between these two aspects and adding (or removing) the option lately just break the existing code because, up to that moment, the behavior was the opposite.

How to reproduce the issue:
An example it provided in this issue: #6915

Versions
System:
OS: Linux
Binaries:
Node: 14.17.0 - /usr/bin/node
Yarn: 1.22.10 - ~/.npm-global/bin/yarn
npm: 6.14.13 - /usr/bin/npm
Browsers:
Chrome: 91.0.4472.77
Firefox: 88.0.1
npmPackages:
@apollo/client: ^3.3.19 => 3.3.19
apollo-upload-client: ^14.1.3 => 14.1.3

benjamn added a commit that referenced this issue Jun 22, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 15, 2023
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