You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
preiously, i used a custom directive directive @authorize(permission: DataPermission!) on ARGUMENT_DEFINITION | INPUT_OBJECT | INPUT_FIELD_DEFINITION | FIELD_DEFINITION to apply the RBAC.
and there tree ways to impl multi-tenant
first, transport method, like to set tenant info in http header, which is simple but not fit my requirement
second,schame method with set tenant argument to every query and mutation, which is not elegant and annoying to using
thrid, schame method with a type Tenant {} as a top level node
but the thrid method can not reuse the directive for the directive can not read the tenant info, is there any way i ignored?
What happened?
I'd like to impl a multi-tenant system in gqlgen.
preiously, i used a custom directive
directive @authorize(permission: DataPermission!) on ARGUMENT_DEFINITION | INPUT_OBJECT | INPUT_FIELD_DEFINITION | FIELD_DEFINITION
to apply the RBAC.and there tree ways to impl multi-tenant
first, transport method, like to set tenant info in http header, which is simple but not fit my requirement
second,schame method with set tenant argument to every query and mutation, which is not elegant and annoying to using
thrid, schame method with a
type Tenant {}
as a top level nodebut the thrid method can not reuse the directive for the directive can not read the tenant info, is there any way i ignored?
What did you expect?
I can get
tenantId
in the directive@authorize
Minimal graphql.schema and models to reproduce
versions
go run github.com/99designs/gqlgen version
?v0.17.61
go version
?go version go1.23.4 linux/amd64
The text was updated successfully, but these errors were encountered: