jaybauer
09/11/2018, 8:49 PMnode-schedule
library to do this, which acts like a Node cron job. I want query to run at midnight every day that will check all the pending posts, see if the DateTime
matches the current day, and then confirm the post.
My question is, how can I run this query on the server? Obviously doing it on the front-end is easy enough, but running these queries on the server is proving challenging, since all the examples with Prisma and it’s resolvers rely on the ctx
object and such. I cannot find any documentation for this in `graphql-yoga`’s README or anywhere else. Does anyone have a quick answer to this?patrickdevivo
09/11/2018, 8:56 PMprisma-bindings
or the new prisma-client
jaybauer
09/11/2018, 9:19 PMprisma-binding
turned out to be the solution, thanks!I had to separate out the Prisma server from the graphql server, then I could access everything I needed.