Effect CommunityEC
Effect Community3y ago
2 replies
Austin

Merging Results of userServiceDb and herokuDb Calls

Hello, hello! Quick lightweight question if anyone has a moment.

I have the following program

const program = pipe(
userServiceDb.getUsersFromDb,
Effect.flatMap((u) =>
herokuDb.getAvatarForUsersByContactSfids(u.map((u) => u.contact_sfid))
)
// Effect.flatMap((u) => sb.upsertUser(u))
);


I need to merge the results of the userServiceDb and the herokuDb calls to use in sb.upsertUser. I can't quite figure it out, but I'm thinking I need to use a variation of zip
Was this page helpful?