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

Fix transcript flash upon comment submission #4032

Merged
merged 1 commit into from Oct 15, 2021
Merged

Conversation

jcmorrow
Copy link
Contributor

Summary

I hit this once in development, it took a very long time to solve, but eventually I tracked it down to a missing field while writing to the Apollo cache. I thought the bug was gone, but then on production it started happening again. I carefully (I thought) compared the objects that I was pulling from and writing to the cache, and didn't spot any immediate differences, but then I found this issue: apollographql/apollo-client#6375. This is the exact issue we are experiencing here, and the fact that someone mentioned null vs. undefined made me wonder if I had missed a small difference. It turns out, that we were writing primaryLabel: undefined, secondaryLabel: undefined into the cache when making comments that did not have labels. The cache was expecting null values when those are missing. It was silently failing, as described in the issue, and then (I think) refetching from the server because it was effectively a cache-miss (I didn't investigate this part too thoroughly since it wasn't super relevant).

@vercel
Copy link

vercel bot commented Oct 15, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/recordreplay/devtools/GJvA1xxk6wMiqafGWdbesiGkbzUx
✅ Preview: https://devtools-git-jm-fix-flash-comments-recordreplay.vercel.app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants