title: Apollo: Call a mutation server-side from cron job?
body: <p>I have a Meteor app that uses Apollo and I am using SyncedCron (<a href="https://github.com/percolatestudio/meteor-synced-cron" rel="nofollow noreferrer">https://github.com/percolatestudio/meteor-synced-cron</a>) to schedule an update operation on the database every 2 hours.</p>
  
  <p>Every two hours, fetch X data from some external API and store in Y collection of the database. Rinse and repeat.</p>
  
  <p>My question is this: should this update operation be implemented as a graphQL mutation, and called server-side from within the cron job (if so, how do you do it?!), or should this be implemented as a normal JS function since it will only ever execute on the server?</p>
  
  <p>All the mutation examples I can find online are invoked from the client by wrapping your View component in a graphql-enabled HOC.</p>
  
  <p>Perhaps I am just misunderstanding the scope of mutations, and the larger question here is whether or not mutations <em>CAN</em> be invoked from the server, or if they are client-side only.</p>
  
  <p>Hoping to find some clarification here on mutation best practices. Thanks!</p>