Update graphql api to allow use of @prepend and @delete relay attr

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
Bryan Frimin
2025-05-23 10:49:44 -07:00
parent 2a25f62480
commit b94a75abcf
7 changed files with 420 additions and 116 deletions

View File

@@ -103,6 +103,8 @@ func (cm ControlMeasure) Delete(
ctx context.Context,
conn pg.Conn,
scope Scoper,
controlID gid.GID,
measureID gid.GID,
) error {
q := `
DELETE
@@ -115,8 +117,8 @@ WHERE
`
args := pgx.StrictNamedArgs{
"control_id": cm.ControlID,
"measure_id": cm.MeasureID,
"control_id": controlID,
"measure_id": measureID,
}
maps.Copy(args, scope.SQLArguments())
q = fmt.Sprintf(q, scope.SQLFragment())

View File

@@ -71,6 +71,8 @@ func (cp ControlPolicy) Delete(
ctx context.Context,
conn pg.Conn,
scope Scoper,
controlID gid.GID,
policyID gid.GID,
) error {
q := `
DELETE
@@ -83,8 +85,8 @@ WHERE
`
args := pgx.StrictNamedArgs{
"control_id": cp.ControlID,
"policy_id": cp.PolicyID,
"control_id": controlID,
"policy_id": policyID,
}
maps.Copy(args, scope.SQLArguments())