You can create type for a particular Metaobject Definition using typeof designer.$inferInsert
syntax
Tento Metaobject Insert
Tento represents Shopify Create Metaobject mutation
index.ts
schema.ts
import { tento } from "@drizzle-team/tento";
import * as schema from "./schema";
const client = tento({ schema });
type NewDesigner = typeof client.metaobjects.designer.$inferInsert;
const newDesigner: NewDesigner = { name: "Alex" };
const result = await client.metaobjects.designer.insert(newDesigner);
// return type
const result: {
_id: string;
_handle: string;
_displayName: string;
_updatedAt: Date;
name: string;
description: string | null;
website: string | null;
}