Infer additional organization fields on react client not working?

When accessing the useActiveOrganization hook, the additional fields are not showing. The backend is working as expected for inserting the additional fields, however frontend inferrence is not working.

I am getting a Property 'type' does not exist on type Prettify<{ ...core org fields }>

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,
      // }),
    ],


Any ideas? Is this a bug?
Was this page helpful?