Go app Convex updates
ok, so I have convex setup in my go app and can query data. Im sure this is something I just don't understand both about Go and about convex but I have to 'save' in my Go project for it to essentially rebuild if I want to see updated data from convex.
so if I go to the convex dashboard, add a task, save, then refresh my project, it won't refresh the data but a save of my code will.
could someone point my to my knowledge deficit 😅
I believe it is a Go misunderstanding so please feel free to ignore.
10 Replies
Can you share your code? We can blame Go or convex or your code 😆
Probably my code haha
Just a sec
This is my main.go file for a simple route
Here is my convex setup. I have db.go and a convex.go (modeled after the old example)
my convex.go where I have query and mutation functions and then db specifics, like LoadTasks and so on
My db.go file
It's not a huge deal right now just odd that it doesn't pickup on changes from the db on a simple refresh
I feel obliged to say that if you see odd names in this starter it is because someone who created a good starter was feeling silly/cheeky and gave it a name I would not have chosen ðŸ«
we give all in service of the pun
It looks like you fetch
tasks
from convex when the go server starts up, and every time it receives a GET request it replies with those same tasks. To fix, you should be able to move db.LoadAllTasks into the app.Get
callback so it runs on every refreshThis in fact did what I wanted, thanks!