UNPKG

@trpc/react-query

Version:

The tRPC React library

25 lines (22 loc) 529 B
'use strict'; /** * @internal */ function getClientArgs(queryKey, opts, infiniteParams) { const path = queryKey[0]; let input = queryKey[1]?.input; if (infiniteParams) { input = { ...input ?? {}, ...infiniteParams.pageParam ? { cursor: infiniteParams.pageParam } : {}, direction: infiniteParams.direction }; } return [ path.join('.'), input, opts?.trpc ]; } exports.getClientArgs = getClientArgs;