UNPKG

flora-exception

Version:

An exception system for FQL.

6 lines (5 loc) 201 B
import { $Any } from "../FloraTypes"; import { query as q } from "faunadb"; export const Read = (ref, $Predicate = $Any) => { return q.If(q.Exists(ref), q.Get(ref), q.Abort("Could not read.")); };