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
Attempting to check for membership by row presence in OrganizationMembership when querying for an associated Organization via a Project. The reason for doing it at project level is that the check expression will be a X OR Y expression in production.
queryGetProjectById($projectId: UUID!) @auth(level: USER) {
project(id: $projectId)
@check(
# This expression would be expanded to have other OR-joined conditions; # for the sake of clarity these are omitted.expr: "this.organization.organizationMemberships_on_organization != []"
) {
# !!! The @redact below causes the issue; the @check above cannot find the field.organization@redact {
organizationMemberships_on_organization(
where: { uid: { eq_expr: "auth.uid" } }
) {
uid # Dummy field.
}
}
# Other fields...
}
}
[REQUIRED] Steps to reproduce
Add test Organization, OrganizationMembership and Project rows. The following mutations could be used:
The @redact directive can be used anywhere in the structure and not affect @check directives. This is what would be expected from the documentation;
Redacted fields are still evaluated for side effects (including data changes and
`@check`) and the results are still available to later steps in CEL expressions
(via `response.fieldName`)
[REQUIRED] Environment info
firebase-tools: 13.29.3
Platform: macOS
[REQUIRED] Test case
Attempting to check for membership by row presence in
OrganizationMembership
when querying for an associatedOrganization
via aProject
. The reason for doing it atproject
level is that the check expression will be aX OR Y
expression in production.schema.gql
:queries.gql
:[REQUIRED] Steps to reproduce
Add test
Organization
,OrganizationMembership
andProject
rows. The following mutations could be used:[REQUIRED] Expected behavior
The
@redact
directive can be used anywhere in the structure and not affect@check
directives. This is what would be expected from the documentation;[REQUIRED] Actual behavior
And a similar response is observed if the
@redact
is moved down toproject.organization.organizationMemberships_on_organization
:If the
@redact
is moved down to the fieldproject.organization.organizationMemberships_on_organization.uid
then the@check
WAI.The text was updated successfully, but these errors were encountered: