basalt / tenancy/src / TenantResolver
Type Alias: TenantResolver
> TenantResolver = (request) => TenantRef | null | Promise<TenantRef | null> & object
Defined in: tenancy/src/resolvers.ts:13
Type Declaration
authoritative?
> readonly optional authoritative?: boolean
An AUTHORITATIVE resolver reads something the platform controls — the Host it serves (subdomain, custom domain) or the route it matched. Once one of them names a tenant, that answer is final: if the tenant does not exist the request resolves to no tenant, and no other resolver — above all not a client-controlled header — gets a say. Authoritative resolvers are always consulted before the others, whatever the list order.
Unmarked resolvers (including headerResolver) are fallbacks, consulted in list order only when no authoritative resolver named a tenant.