INNER CODE UNIT · Go
func
movio/bramble · auth.go:22
func (a AllowedFields) IsAllowed(fieldName string) (bool, AllowedFields) {
if fieldName == "__schema" || fieldName == "__type" {
return true, AllowedFields{AllowAll: true}
}
if fieldName == "__typename" {
return true, AllowedFields{}
}
if f, ok := a.AllowedSubfields[fieldName]; ok {
return true, f
}
return false, AllowedFields{}
}
// OperationPermissions represents the top level permissions for all operation types
type OperationPermissions struct {
AllowedRootQueryFields AllowedFields `json:"query"`