From 2766e86f5d40e5a47d7ccea2e8ec5881d4c6bb73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Valverd=C3=A9?= Date: Fri, 27 Feb 2026 14:14:54 +0100 Subject: [PATCH] Fix --- packages/effect-fc/src/Query.ts | 2 +- packages/example/src/routes/query.tsx | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/effect-fc/src/Query.ts b/packages/effect-fc/src/Query.ts index 9c306b7..875cb84 100644 --- a/packages/effect-fc/src/Query.ts +++ b/packages/effect-fc/src/Query.ts @@ -11,7 +11,7 @@ extends Pipeable.Pipeable { readonly [QueryTypeId]: QueryTypeId readonly context: Context.Context - readonly key: Stream.Stream + readonly key: Stream.Stream readonly f: (key: K) => Effect.Effect readonly initialProgress: P diff --git a/packages/example/src/routes/query.tsx b/packages/example/src/routes/query.tsx index 1db5ef5..a6e2f4d 100644 --- a/packages/example/src/routes/query.tsx +++ b/packages/example/src/routes/query.tsx @@ -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 }`)),