<@UEV6H65EV> I did something similar but not as ex...
# orm-help
m
@serum I did something similar but not as exact. Basically I used a serverless function to call a query endpoint and then update the needed records based on the results of the query. Obviously this ended up meaning some could be exipred for a little while waiting for the function to run. Why not just add an expiry date in the backend?
s
I have both an
expiresAt
and a
status
field in the backend. the issue I'm having is, that the
status
field might show
PENDING
, when it in fact is already expired. this is handled in my custom resolver, though
I might change the type of the
status
field in the backend to
Copy code
enum InviteStatus {
    ACCEPTED, NOT_ACCEPTED
}
and then have
Copy code
enum InviteStatus {
    ACCEPTED, PENDING, EXPIRED
}
in my API, implemented with a resolver and the
expiresAt
field
OTOH, then I'd have to re-compute the status field on every query, which is why I was asking in the first place 😃
anyways, simple does it, I guess