-
-
Notifications
You must be signed in to change notification settings - Fork 454
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
(core) - Fix stringifyVariables (and thus operation keys) for Files #650
Conversation
🦋 Changeset is good to goLatest commit: 6ec3f62 We got this. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could also add file.size
to avoid the very unlikely scenario of these being equal but the solution in itself is awesome. Great work!
thanks for looking into this problem. i don't want to complicate things too much, but you can assign (as i explained in #649, i would prefer to just drop deduplication for mutations, but still, with this pull-requests, things will be more consistent, and that is a good thing) |
Mutations aren't deduplicated it's a single stream of events, so the response is associated with an operationKey. We need a way to distinguish these things efficiently |
We could likely just use |
Ok, we've found an alternative. Instead we now generate a random key for objects with non-enumerable keys that aren't "plain objects". So this should support |
Any object without any enumerable keys that isn't a plain object will now receive a random key.
d438195
to
dfe119f
Compare
Resolve #649
Summary
When two operations with a
File
in the variables are sent the operation key would likely be the same since we never take anyFile
attributes into account.We'd hence like to have special handling for objects without any enumerable keys that also aren't plain objects.
Set of changes