Notifying users on version changes
Something I'd be personally be curious to read about is some strategies for notifying users that their app is out-of-date upon a new frontend or backend deployment. Seems neat because I suspect you could do this with Convex more easily than with other setups?
4 Replies
One idea I've had for this but haven't written up yet is to have a table with a single row with a version field in it. On clients you can
useQuery('version')
and when it changes, show a button for users to update. or, if it's a major version update, you could even trigger a refresh manually, if they're on page where that is acceptableI like that—so simple!
Did you have any thoughts on how/when to update that table with a new version?
I guess one way could be to build it into your deploy process, and have a mutation that you run from your deploy env after a successful deploy, which is gated by a secret key available on in that deploy environment
Perhaps the deploy process could check an
.api-version
file, which you manually increment as a part of the development process, or something?yeah you could also have it be a semver string, and change it when you feel like you change your api in a backwards incompatible way
or just always update by incrementing a counter from the deploy stage. maybe
npm run bump
or something? If you get a good pattern going, report backI will!