ion">)</span><span class="token punctuation">)</span>

<span class="token keyword">val</span> apiWithCost <span class="token operator">=</span> api @@ 
  queryCost @@ <span class="token comment">// or queryCost(f: Field =&gt; Double) to specify your own field cost estimation</span>
  <span class="token comment">// or queryCostWith(f: Field =&gt; Double)(p: Double =&gt; URIO[R, Any]) to also specify a side effect after computing the total cost</span>
  <span class="token comment">// or queryCostZIO(f: Field 