(id: number)
| 68 | // Wrap the resolver in a service method. The resolver batches calls to |
| 69 | // `getUserById` that occur within the delay window. |
| 70 | const getUserById = (id: number) => |
| 71 | Effect.request(new GetUserById({ id }), resolver).pipe( |
| 72 | Effect.withSpan("Users.getUserById", { attributes: { userId: id } }) |
| 73 | ) |
| 74 | |
| 75 | return { getUserById } as const |
| 76 | }) |