(
externalId: string,
)
| 7141 | .pipe(Effect.map((row) => (row === null ? null : rowToAdminSubject(row)))); |
| 7142 | |
| 7143 | const listSubjectConnections = ( |
| 7144 | externalId: string, |
| 7145 | ): Effect.Effect<readonly AdminConnection[], StorageFailure> => |
| 7146 | platformCore |
| 7147 | .findMany("connection", { |
| 7148 | // `owner: "user"` explicitly: an org connection's `subject` is the |
| 7149 | // empty-string sentinel, and attributing those to a user would be |
| 7150 | // a lie in every host that has one. |
| 7151 | where: (b: AnyCb) => b.and(b("owner", "=", "user"), b("subject", "=", externalId)), |
| 7152 | orderBy: [ |
| 7153 | ["integration", "asc"], |
| 7154 | ["name", "asc"], |
| 7155 | ], |
| 7156 | }) |
| 7157 | .pipe(Effect.map((rows) => rows.map(rowToAdminConnection))); |
| 7158 | |
| 7159 | // ONE connection query for the whole page, not one per subject. The |
| 7160 | // per-subject form was an N+1: a default page issued 100 sequential |
no outgoing calls
no test coverage detected