organization({
schema: {
organization: {
modelName: "organization",
fields: {
id: "id",
name: "name",
slug: "slug",
type: "type",
createdAt: "created_at",
updatedAt: "updated_at",
},
additionalFields: {
type: {
type: "string" as const,
fieldName: "type",
returned: true,
input: true,
required: true,
}
},
}
},
... other table mappings
})
// The plugins I pass to the react client
plugins: [
// Ensures all extra fields are added to the client
inferAdditionalFields<typeof auth>(), // <~ Should infer
organizationClient(),
// Also tried adding
// organizationClient({
// $inferAuth: auth,
// }),
],
organization({
schema: {
organization: {
modelName: "organization",
fields: {
id: "id",
name: "name",
slug: "slug",
type: "type",
createdAt: "created_at",
updatedAt: "updated_at",
},
additionalFields: {
type: {
type: "string" as const,
fieldName: "type",
returned: true,
input: true,
required: true,
}
},
}
},
... other table mappings
})
// The plugins I pass to the react client
plugins: [
// Ensures all extra fields are added to the client
inferAdditionalFields<typeof auth>(), // <~ Should infer
organizationClient(),
// Also tried adding
// organizationClient({
// $inferAuth: auth,
// }),
],