@defaultTenant is no longer supported. The directive is still declared, so a schema that applies it parses, but every application is a build error.
SDL signature
directive @defaultTenant on OBJECT
Why it went
The marker resolved a federation entity whose @key lacks the tenant column on a tenant the request named, its entity default tenant. A request no longer names any tenant: which tenants a request may reach is the connection source’s to say, and global tables are read on the connection the source picks for a key with no tenant (see How-to: Tenant scoping). With no tenant named, a representation without the tenant column cannot name the tenant to fetch from.
What to do instead
Remove the directive, then either:
-
add a field mapped to the tenant column to the key, so each representation names its own tenant:
type FeideBruker @table(name: "PERSON") @key(fields: "brukernavn institusjon") { brukernavn: String institusjon: Int @field(name: "INSTITUSJONSNR") } -
or mark that key
resolvable: false, so_entitiesdoes not resolve it.
See How-to: Federation key fields for keys in general.