Releases: n1ru4l/graphql-live-query
@n1ru4l/[email protected]
Minor Changes
- f585fb3: Support TypeScript ESM module resolution. More information on https://devblogs.microsoft.com/typescript/announcing-typescript-4-7/#ecmascript-module-support-in-node-js
@n1ru4l/[email protected]
Minor Changes
- f585fb3: Support TypeScript ESM module resolution. More information on https://devblogs.microsoft.com/typescript/announcing-typescript-4-7/#ecmascript-module-support-in-node-js
@n1ru4l/[email protected]
Minor Changes
- f585fb3: Support TypeScript ESM module resolution. More information on https://devblogs.microsoft.com/typescript/announcing-typescript-4-7/#ecmascript-module-support-in-node-js
@n1ru4l/[email protected]
Minor Changes
-
93239dc: Drop the
executeconstructor argument option.
Please useInMemoryLiveQueryStore.makeExecuteinstead.Old
import { InMemoryLiveQueryStore } from "@n1ru4l/in-memory-live-query-store"; import { execute as executeImplementation } from "graphql"; const liveQueryStore = new InMemoryLiveQueryStore({ execute }); const execute = liveQueryStore.execute;
New
import { InMemoryLiveQueryStore } from "@n1ru4l/in-memory-live-query-store"; import { execute as executeImplementation } from "graphql"; const liveQueryStore = new InMemoryLiveQueryStore(); const execute = liveQueryStore.makeExecute(executeImplementation);
-
f585fb3: Support TypeScript ESM module resolution. More information on https://devblogs.microsoft.com/typescript/announcing-typescript-4-7/#ecmascript-module-support-in-node-js
Patch Changes
- Updated dependencies [f585fb3]
- @n1ru4l/[email protected]
@n1ru4l/[email protected]
Minor Changes
- f585fb3: Support TypeScript ESM module resolution. More information on https://devblogs.microsoft.com/typescript/announcing-typescript-4-7/#ecmascript-module-support-in-node-js
@n1ru4l/[email protected]
Minor Changes
- f585fb3: Support TypeScript ESM module resolution. More information on https://devblogs.microsoft.com/typescript/announcing-typescript-4-7/#ecmascript-module-support-in-node-js
Patch Changes
- 25ad6d0: Ensure the
dataproperty reference changes for each published value in order to please GraphQL clients that rely on immutability.
@n1ru4l/[email protected]
Minor Changes
- f585fb3: Support TypeScript ESM module resolution. More information on https://devblogs.microsoft.com/typescript/announcing-typescript-4-7/#ecmascript-module-support-in-node-js
Patch Changes
- Updated dependencies [25ad6d0]
- Updated dependencies [f585fb3]
- @n1ru4l/[email protected]
- @n1ru4l/[email protected]
@n1ru4l/[email protected]
Minor Changes
- f585fb3: Support TypeScript ESM module resolution. More information on https://devblogs.microsoft.com/typescript/announcing-typescript-4-7/#ecmascript-module-support-in-node-js
Patch Changes
- Updated dependencies [25ad6d0]
- Updated dependencies [f585fb3]
- @n1ru4l/[email protected]
@n1ru4l/[email protected]
Minor Changes
-
727e806: The source returned from execute is now lazy and will only start emitting values once it is consumed. This prevents memory leaks.
BREAKING: If the wrapped
executefunction returns a stream (e.g. because you forgot to add theNoLiveMixedWithDeferStreamRulevalidation rule) it causes theexecutefunction to reject instead of publishing a ExecutionResult error payload. This change has been made in order to treat the error as unexpected and not leak any implementation details to the clients. -
aee5d58: Allow setting custom invalidation indices.
Until now doing granular or very specific index invalidations wasn't possible. Thus invalidation might not have been efficient enough, as either too many or too few live query operation "subscriptions" got invalidated.
The new
indexByconfiguration option for theInMemoryLiveQueryStore, allows configuring specific indices suitable for the consumed GraphQL schema, resulting more granular and efficient invalidations.Invalidate by single field with arguments:
const store = new InMemoryLiveQueryStore({ includeIdentifierExtension: true, indexBy: [ { field: "Query.posts", args: ["needle"] } ] }); const execute = store.makeExecute(executeImplementation); const document = parse(/* GraphQL */ ` query @live { posts(needle: "skrrrrt") { id title } } `); const executionResult = execute({ document, schema }); let result = await executionResult.next(); expect(result.value).toEqual({ data: { posts: [] }, extensions: { liveResourceIdentifier: ["Query.posts", 'Query.posts(needle:"skrrrrt")'] }, isLive: true });
Invalidation by single field with specific arguments:
const store = new InMemoryLiveQueryStore({ includeIdentifierExtension: true, indexBy: [ { field: "Query.posts", // index will only be used if the needle argument value equals "brrrrt" args: [["needle", "brrrrt"]] } ] });
@n1ru4l/[email protected]
Patch Changes
- 727e806: fix memory leak cause by AsyncIterables not being disposed properly.