title: Nexus Prisma - How to handle createdAt and updatedAt with crud globally?
body: <p>First thing I came up with, is by calling <code>computedInputs</code> in the <code>nexusPrisma</code> option. But it won't work since they need to be handled differently depending on the situation, but globally:</p>
  <pre><code>1. create -&gt; createdAt = now, updatedAt = null
  2. update -&gt; createdAt = keep as it is, updatedAt = now
  </code></pre>
  <p>In order to make it work, I need to set computedInputs individually like so:</p>
  <pre class="lang-js prettyprint-override"><code>t.crud.createOneX({
    computedInputs: {
      createdAt: () =&gt; DateTime.utc().toString(),
      updatedAt: () =&gt; null,
    },
  });
  
  t.crud.updateOneX({
    computedInputs: {
      createdAt: () =&gt; undefined,
      updatedAt: () =&gt; DateTime.utc().toString(),
    },
  });
  </code></pre>
  <p>While this might work, I'm unable to &quot;compute&quot; these inputs on the nested models. In order to prevent passing createdAt/updatedAt, I have to create another <code>t.crud</code> on that resource as well, without these timestamps.</p>
  <p>The last workaround for this that might work, is to not use <code>t.crud</code> at all, which is a bummer.</p>