Closed devklepacki closed 6 months ago
hey @devklepacki, I can't reproduce this with the code you shared. Could you create a minimal reproduction repository for this issue?
Omg. Just wanted to send a reproduction when I realized something. kv.hgetall
is returning an actual kv object, not a json string to be parsed. Eh so much human time wasted on that! It was my typeguard failing, not the hgetall
. Are there type definition available for the @vercel/kv
package? I'm unable to find any.
ah, no worries. Yes @vercel/kv
comes with type definitions, specifically we just expose the upstash/redis-client
typings.
If you are looking for code it is here: https://github.com/upstash/upstash-redis/blob/main/pkg/commands/hgetall.ts
Hello, I noticed that kv.hgetall seems to be always returning
null
on middleware. Here is how I do it:While it does work from Vercel CLI :
Am I doing something wrong?