i currently have users submit votes `Vote` on clie...
# prisma-whats-new
b
i currently have users submit votes
Vote
on client side. I also have a small server that is subscribed to
Vote
create/update which then calculates the average into
Rating
. Client side runs the update/create
Vote
then refetches
Rating
. Server listens to the update/create and then updates the
Rating
. However, since I believe the refetch is happening before or in parallel to my service, the client side refetch is still displaying the old
Rating
. Does anyone have recommendations on how to tackle this?
a
Are you using a subscription to get the updated Rating?
b
so im using a subscription on the server
but im hesitant to use a subscription on the client side because if there are many votes, the client will always see different ratings
a
Then you close the subscription after the first result
Then it becomes just a way to async fetch
subscribe -> get first Rating result -> unsubscribe
b
yeah that works
let me give it a shot
👍🏻 1
thanks again @agartha!
😎 1