-
Notifications
You must be signed in to change notification settings - Fork 162
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
Handle client termination and recreation #1303
Conversation
InMemoryCache, | ||
makeReference, | ||
useQuery, | ||
} from "@apollo/client"; | ||
import ColorSchemeGenerator from "./ColorSchemeGenerator"; | ||
import Favorites from "./Favorites"; | ||
import ColorLookup from "./ColorLookup"; | ||
import { GET_SAVED_COLORS } from "./queries"; | ||
import "./App.css"; | ||
|
||
function App() { |
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.
To make this testable, I had to move some code around so that I could recreate the client and ensure it was set in context correctly.
Job #134: Bundle Size — 849.63KiB (+0.03%).Warning Bundle contains 5 duplicate packages – View duplicate packages Bundle metrics
Bundle size by type
View job #134 report View jerel/fix-client-termination branch activity View project dashboard |
1ebdb78
to
11c4734
Compare
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.
A really nice quality of life improvement! 🚀
Fixes #1240
Handles when
client.stop
is called and properly disconnects the client instance from devtools and performs some cleanup in the content script. This also makes it possible to track newly created clients after a previous client was terminated.