I need a advice: An article has an `onTime`, a `o...
# prisma-whats-new
t
I need a advice: An article has an
onTime
, a
offTime
and a
status
. I want to set the
status
to "published" after onTime and to 'draft' after offTime. What is the best way to execute a action on a time based event? Any best practice?
m
not ideal but you could implement a filter inside your client graphql call that filters out articles based on time
or you could implement your own resolver which queries the database with the appropriate filters
t
I prefer to take this logic on the server side. A resolver is a good idea. I will take a look on this. Thanks 🤗