Fix console app graphQL queries

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-02-13 14:11:11 +04:00
parent 4c67217e35
commit ec3d8fad40
22 changed files with 229 additions and 209 deletions

View File

@@ -736,13 +736,10 @@ WHERE
args := pgx.StrictNamedArgs{"identity_id": identityID}
maps.Copy(args, filter.SQLArguments())
rows, err := conn.Query(ctx, q, args)
if err != nil {
return 0, fmt.Errorf("cannot query iam_membership_profiles: %w", err)
}
row := conn.QueryRow(ctx, q, args)
var count int
err = rows.Scan(&count)
err := row.Scan(&count)
if err != nil {
return 0, fmt.Errorf("cannot collect count: %w", err)
}
@@ -774,13 +771,10 @@ WHERE
maps.Copy(args, scope.SQLArguments())
maps.Copy(args, filter.SQLArguments())
rows, err := conn.Query(ctx, q, args)
if err != nil {
return 0, fmt.Errorf("cannot query iam_membership_profiles: %w", err)
}
row := conn.QueryRow(ctx, q, args)
var count int
err = rows.Scan(&count)
err := row.Scan(&count)
if err != nil {
return 0, fmt.Errorf("cannot collect count: %w", err)
}