Skip to main content

Field selection

You can improve performance by specifying which fields to return using the fields parameter. This reduces payload size and bandwidth.

TypeScript
// Return only specific fields
const user = await manta.fetchOneRecord({
table: "users",
where: { user_id: "user-1" },
fields: ["user_id", "first_name", "last_name"], // Only these fields will be returned
});

// Return all fields by default
const user = await manta.fetchOneRecord({
table: "users",
where: { user_id: "user-1" },
});