Fix
All checks were successful
Lint / lint (push) Successful in 12s

This commit is contained in:
Julien Valverdé
2026-02-27 14:14:54 +01:00
parent 21028fd75b
commit 2766e86f5d
2 changed files with 3 additions and 2 deletions

View File

@@ -11,7 +11,7 @@ extends Pipeable.Pipeable {
readonly [QueryTypeId]: QueryTypeId
readonly context: Context.Context<Scope.Scope | QueryClient.QueryClient | R>
readonly key: Stream.Stream<K>
readonly key: Stream.Stream<K, never, never>
readonly f: (key: K) => Effect.Effect<A, E, R>
readonly initialProgress: P

View File

@@ -18,9 +18,10 @@ const ResultView = Component.make("ResultView")(function*() {
const [idRef, query, mutation] = yield* Component.useOnMount(() => Effect.gen(function*() {
const idRef = yield* SubscriptionRef.make(1)
const key = Stream.map(idRef.changes, id => [id] as const)
const query = yield* Query.service({
key: Stream.map(idRef.changes, id => [id] as const),
key,
f: ([id]) => HttpClient.HttpClient.pipe(
Effect.tap(Effect.sleep("500 millis")),
Effect.andThen(client => client.get(`https://jsonplaceholder.typicode.com/posts/${ id }`)),