import * as z from "zod"; import type { AcfLinkFragment } from "#graphql/operations"; const acfLinkSchema = z.object({ title: z.string(), url: z.string(), target: z.string().optional().default(""), }); export type AcfLinkOutput = z.infer; export function parseAcfLink(data?: Partial) { try { return acfLinkSchema.parse(data); } catch { return undefined; } }