diff --git a/README.md b/README.md index 82c75e11..14be70f3 100644 --- a/README.md +++ b/README.md @@ -203,7 +203,7 @@ function useQuery< >( schema: DescMethodUnary, input?: SkipToken | MessageInitShape, - { transport, ...queryOptions }: UseQueryOptions = {}, + { transport, ...queryOptions }: UseQueryOptions = {} ): UseQueryResult; ``` @@ -232,7 +232,7 @@ function useInfiniteQuery< pageParamKey, getNextPageParam, ...queryOptions - }: UseInfiniteQueryOptions, + }: UseInfiniteQueryOptions ): UseInfiniteQueryResult>, ConnectError>; ``` @@ -249,7 +249,7 @@ Identical to useInfiniteQuery but mapping to the `useSuspenseInfiniteQuery` hook ```ts function useMutation( schema: DescMethodUnary, - { transport, ...queryOptions }: UseMutationOptions = {}, + { transport, ...queryOptions }: UseMutationOptions = {} ): UseMutationResult, ConnectError, PartialMessage>; ``` @@ -261,7 +261,7 @@ Any additional `options` you pass to `useMutation` will be merged with the optio ```ts function createConnectQueryKey( - params: KeyParams, + params: KeyParams ): ConnectQueryKey; ``` @@ -286,6 +286,7 @@ const queryKey = createConnectQueryKey({ transport: myTransport, // You can provide a partial message here. input: { sentence: "hello" }, + cardinality: "finite", }); // queryKey: @@ -309,6 +310,7 @@ import { ElizaService } from "./gen/eliza_pb"; const queryKey = createConnectQueryKey({ schema: ElizaService, + cardinality: "finite", }); // queryKey: @@ -346,7 +348,7 @@ function callUnaryMethod( input: MessageInitShape | undefined, options?: { signal?: AbortSignal; - }, + } ): Promise; ``` @@ -369,6 +371,7 @@ queryClient.setQueryData( schema: example, transport, input: {}, + cardinality: "finite", }), createProtobufSafeUpdater(example, (prev) => { if (prev === undefined) { @@ -393,7 +396,7 @@ function createQueryOptions( transport, }: { transport: Transport; - }, + } ): { queryKey: ConnectQueryKey; queryFn: QueryFunction, ConnectQueryKey> | SkipToken; @@ -436,7 +439,7 @@ function createInfiniteQueryOptions< transport, getNextPageParam, pageParamKey, - }: ConnectInfiniteQueryOptions, + }: ConnectInfiniteQueryOptions ): { getNextPageParam: ConnectInfiniteQueryOptions< I, @@ -470,7 +473,7 @@ const transport = addStaticKeyToTransport( createConnectTransport({ baseUrl: "https://demo.connectrpc.com", }), - "demo", + "demo" ); ``` @@ -606,6 +609,7 @@ function prefetch() { schema: say, transport: myTransport, input: { sentence: "Hello" }, + cardinality: "finite", }), queryFn: () => callUnaryMethod(myTransport, say, { sentence: "Hello" }), });