Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@trpc/react-query

Package Overview
Dependencies
Maintainers
3
Versions
709
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@trpc/react-query - npm Package Compare versions

Comparing version 10.5.0 to 10.6.0

dist/createHooksInternal-10b1b7ef.mjs

2

dist/createTRPCReact.d.ts

@@ -5,2 +5,3 @@ import { InfiniteData } from '@tanstack/react-query';

import { inferTransformedProcedureOutput, inferTransformedSubscriptionOutput } from '@trpc/server/shared';
import { TRPCUseQueries } from './internals/useQueries';
import { CreateReactUtilsProxy } from './shared';

@@ -43,2 +44,3 @@ import { CreateClient, CreateReactQueryHooks, TRPCProvider, UseDehydratedState, UseTRPCInfiniteQueryOptions, UseTRPCInfiniteQueryResult, UseTRPCInfiniteQuerySuccessResult, UseTRPCMutationOptions, UseTRPCMutationResult, UseTRPCQueryOptions, UseTRPCQueryResult, UseTRPCQuerySuccessResult, UseTRPCSubscriptionOptions } from './shared/hooks/createHooksInternal';

createClient: CreateClient<TRouter>;
useQueries: TRPCUseQueries<TRouter>;
useDehydratedState: UseDehydratedState<TRouter>;

@@ -45,0 +47,0 @@ } & DecoratedProcedureRecord<TRouter['_def']['record'], TFlags>;

4

dist/index.js

@@ -8,5 +8,5 @@ 'use strict';

var React = require('react');
var createHooksInternal = require('./createHooksInternal-d9b9c414.js');
var createHooksInternal = require('./createHooksInternal-860b8183.js');
require('@tanstack/react-query');
require('./getArrayQueryKey-24927615.js');
require('./getArrayQueryKey-671d083c.js');

@@ -13,0 +13,0 @@ /**

@@ -1,2 +0,2 @@

import { DehydratedState, InfiniteQueryObserverSuccessResult, QueryObserverSuccessResult, UseInfiniteQueryOptions, UseInfiniteQueryResult, UseMutationOptions, UseMutationResult, UseQueryOptions, UseQueryResult } from '@tanstack/react-query';
import { DehydratedState, InfiniteQueryObserverSuccessResult, QueryObserverSuccessResult, QueryOptions, UseInfiniteQueryOptions, UseInfiniteQueryResult, UseMutationOptions, UseMutationResult, UseQueryOptions, UseQueryResult } from '@tanstack/react-query';
import { CreateTRPCClientOptions, TRPCClient, TRPCClientErrorLike, TRPCRequestOptions } from '@trpc/client';

@@ -8,2 +8,3 @@ import type { AnyRouter, ProcedureRecord, inferHandlerInput, inferProcedureClientError, inferProcedureInput, inferProcedureOutput } from '@trpc/server';

import { TRPCContextProps, TRPCContextState } from '../../internals/context';
import { TRPCUseQueries } from '../../internals/useQueries';
import { CreateTRPCReactOptions } from '../types';

@@ -33,2 +34,4 @@ export declare type OutputWithCursor<TData, TCursor = any> = {

}
export interface TRPCQueryOptions<TPath, TInput, TData, TError> extends QueryOptions<TData, TError, TData, [TPath, TInput]>, TRPCUseQueryBaseOptions {
}
export interface UseTRPCInfiniteQueryOptions<TPath, TInput, TOutput, TError> extends UseInfiniteQueryOptions<TOutput, TError, TOutput, TOutput, [

@@ -47,2 +50,3 @@ TPath,

}
export declare function getClientArgs<TPathAndInput extends unknown[], TOptions>(pathAndInput: TPathAndInput, opts: TOptions): readonly [unknown, unknown, any];
declare type inferInfiniteQueryNames<TObj extends ProcedureRecord> = {

@@ -99,2 +103,3 @@ [TPath in keyof TObj]: inferProcedureInput<TObj[TPath]> extends {

useQuery: <TPath extends keyof TRouter["_def"]["queries"] & string, TQueryFnData = inferProcedures<TRouter["_def"]["queries"]>[TPath]["output"], TData = inferProcedures<TRouter["_def"]["queries"]>[TPath]["output"]>(pathAndInput: [path: TPath, ...args: import("@trpc/server").ProcedureArgs<import("@trpc/server").inferProcedureParams<TRouter["_def"]["queries"][TPath]>>], opts?: UseTRPCQueryOptions<TPath, inferProcedures<TRouter["_def"]["queries"]>[TPath]["input"], TQueryFnData, TData, TRPCClientErrorLike<TRouter>> | undefined) => UseTRPCQueryResult<TData, TRPCClientErrorLike<TRouter>>;
useQueries: TRPCUseQueries<TRouter>;
useMutation: <TPath_1 extends keyof TRouter["_def"]["mutations"] & string, TContext = unknown>(path: TPath_1 | [TPath_1], opts?: UseTRPCMutationOptions<inferProcedures<TRouter["_def"]["mutations"]>[TPath_1]["input"], TRPCClientErrorLike<TRouter>, inferProcedures<TRouter["_def"]["mutations"]>[TPath_1]["output"], TContext> | undefined) => UseTRPCMutationResult<inferProcedures<TRouter["_def"]["mutations"]>[TPath_1]["output"], TRPCClientErrorLike<TRouter>, inferProcedures<TRouter["_def"]["mutations"]>[TPath_1]["input"], TContext>;

@@ -115,2 +120,3 @@ useSubscription: <TPath_2 extends keyof TRouter["_def"]["subscriptions"] & string, TOutput extends inferObservableValue<inferProcedureOutput<TRouter["_def"]["subscriptions"][TPath_2]>>>(pathAndInput: [path: TPath_2, ...args: import("@trpc/server").ProcedureArgs<import("@trpc/server").inferProcedureParams<TRouter["_def"]["subscriptions"][TPath_2]>>], opts: UseTRPCSubscriptionOptions<inferObservableValue<inferProcedureOutput<TRouter["_def"]["subscriptions"][TPath_2]>>, inferProcedureClientError<TRouter["_def"]["subscriptions"][TPath_2]>>) => void;

useQuery: <TPath extends keyof TRouter["_def"]["queries"] & string, TQueryFnData = inferProcedures<TRouter["_def"]["queries"]>[TPath]["output"], TData = inferProcedures<TRouter["_def"]["queries"]>[TPath]["output"]>(pathAndInput: [path: TPath, ...args: import("@trpc/server").ProcedureArgs<import("@trpc/server").inferProcedureParams<TRouter["_def"]["queries"][TPath]>>], opts?: UseTRPCQueryOptions<TPath, inferProcedures<TRouter["_def"]["queries"]>[TPath]["input"], TQueryFnData, TData, TRPCClientErrorLike<TRouter>> | undefined) => UseTRPCQueryResult<TData, TRPCClientErrorLike<TRouter>>;
useQueries: TRPCUseQueries<TRouter>;
useMutation: <TPath_1 extends keyof TRouter["_def"]["mutations"] & string, TContext = unknown>(path: TPath_1 | [TPath_1], opts?: UseTRPCMutationOptions<inferProcedures<TRouter["_def"]["mutations"]>[TPath_1]["input"], TRPCClientErrorLike<TRouter>, inferProcedures<TRouter["_def"]["mutations"]>[TPath_1]["output"], TContext> | undefined) => UseTRPCMutationResult<inferProcedures<TRouter["_def"]["mutations"]>[TPath_1]["output"], TRPCClientErrorLike<TRouter>, inferProcedures<TRouter["_def"]["mutations"]>[TPath_1]["input"], TContext>;

@@ -117,0 +123,0 @@ useSubscription: <TPath_2 extends keyof TRouter["_def"]["subscriptions"] & string, TOutput extends inferObservableValue<inferProcedureOutput<TRouter["_def"]["subscriptions"][TPath_2]>>>(pathAndInput: [path: TPath_2, ...args: import("@trpc/server").ProcedureArgs<import("@trpc/server").inferProcedureParams<TRouter["_def"]["subscriptions"][TPath_2]>>], opts: UseTRPCSubscriptionOptions<inferObservableValue<inferProcedureOutput<TRouter["_def"]["subscriptions"][TPath_2]>>, inferProcedureClientError<TRouter["_def"]["subscriptions"][TPath_2]>>) => void;

export * from './proxy/decorationProxy';
export * from './proxy/utilsProxy';
export * from './proxy/useQueriesProxy';
export type { DecoratedProcedureRecord, DecorateProcedure, } from '../createTRPCReact';
export type { TRPCUseQueries } from '../internals/useQueries';
export * from './hooks/createHooksInternal';

@@ -5,0 +7,0 @@ export * from './queryClient';

@@ -5,3 +5,3 @@ 'use strict';

var createHooksInternal = require('../createHooksInternal-d9b9c414.js');
var createHooksInternal = require('../createHooksInternal-860b8183.js');
var queryClient = require('../queryClient-358a9a75.js');

@@ -12,3 +12,3 @@ require('@trpc/server/shared');

require('react');
require('../getArrayQueryKey-24927615.js');
require('../getArrayQueryKey-671d083c.js');

@@ -20,2 +20,4 @@

exports.createReactQueryUtilsProxy = createHooksInternal.createReactQueryUtilsProxy;
exports.createUseQueriesProxy = createHooksInternal.createUseQueriesProxy;
exports.getClientArgs = createHooksInternal.getClientArgs;
exports.getQueryClient = queryClient.getQueryClient;

@@ -8,35 +8,35 @@ import { CancelOptions, InfiniteData, InvalidateOptions, InvalidateQueryFilters, RefetchOptions, RefetchQueryFilters, ResetOptions, SetDataOptions, Updater } from '@tanstack/react-query';

/**
* @link https://react-query.tanstack.com/guides/prefetching
* @link https://tanstack.com/query/v4/docs/reference/QueryClient#queryclientfetchquery
*/
fetch(input: inferProcedureInput<TProcedure>, opts?: TRPCFetchQueryOptions<inferProcedureInput<TProcedure>, TRPCClientError<TRouter>, inferTransformedProcedureOutput<TProcedure>>): Promise<inferTransformedProcedureOutput<TProcedure>>;
/**
* @link https://react-query.tanstack.com/guides/prefetching
* @link https://tanstack.com/query/v4/docs/reference/QueryClient#queryclientfetchinfinitequery
*/
fetchInfinite(input: inferProcedureInput<TProcedure>, opts?: TRPCFetchInfiniteQueryOptions<inferProcedureInput<TProcedure>, TRPCClientError<TRouter>, inferTransformedProcedureOutput<TProcedure>>): Promise<InfiniteData<inferTransformedProcedureOutput<TProcedure>>>;
/**
* @link https://react-query.tanstack.com/guides/prefetching
* @link https://tanstack.com/query/v4/docs/reference/QueryClient#queryclientprefetchquery
*/
prefetch(input: inferProcedureInput<TProcedure>, opts?: TRPCFetchQueryOptions<inferProcedureInput<TProcedure>, TRPCClientError<TRouter>, inferTransformedProcedureOutput<TProcedure>>): Promise<void>;
/**
* @link https://react-query.tanstack.com/guides/prefetching
* @link https://tanstack.com/query/v4/docs/reference/QueryClient#queryclientprefetchinfinitequery
*/
prefetchInfinite(input: inferProcedureInput<TProcedure>, procedureOpts?: ProcedureOptions, opts?: TRPCFetchInfiniteQueryOptions<inferProcedureInput<TProcedure>, TRPCClientError<TRouter>, inferTransformedProcedureOutput<TProcedure>>): Promise<void>;
/**
* @link https://react-query.tanstack.com/guides/query-invalidation
* @link https://tanstack.com/query/v4/docs/reference/QueryClient#queryclientinvalidatequeries
*/
invalidate(input?: inferProcedureInput<TProcedure>, filters?: InvalidateQueryFilters, options?: InvalidateOptions): Promise<void>;
/**
* @link https://react-query.tanstack.com/reference/QueryClient#queryclientrefetchqueries
* @link https://tanstack.com/query/v4/docs/reference/QueryClient#queryclientrefetchqueries
*/
refetch(input?: inferProcedureInput<TProcedure>, filters?: RefetchQueryFilters, options?: RefetchOptions): Promise<void>;
/**
* @link https://react-query.tanstack.com/guides/query-cancellation
* @link https://tanstack.com/query/v4/docs/reference/QueryClient#queryclientcancelqueries
*/
cancel(input?: inferProcedureInput<TProcedure>, options?: CancelOptions): Promise<void>;
/**
* @link https://react-query.tanstack.com/reference/QueryClient#queryclientresetqueries
* @link https://tanstack.com/query/v4/docs/reference/QueryClient#queryclientresetqueries
*/
reset(input?: inferProcedureInput<TProcedure>, options?: ResetOptions): Promise<void>;
/**
* @link https://react-query.tanstack.com/reference/QueryClient#queryclientsetquerydata
* @link https://tanstack.com/query/v4/docs/reference/QueryClient#queryclientsetquerydata
*/

@@ -49,11 +49,11 @@ setData(

/**
* @link https://react-query.tanstack.com/reference/QueryClient#queryclientgetquerydata
* @link https://tanstack.com/query/v4/docs/reference/QueryClient#queryclientsetquerydata
*/
setInfiniteData(input: inferProcedureInput<TProcedure>, updater: Updater<InfiniteData<inferTransformedProcedureOutput<TProcedure>> | undefined, InfiniteData<inferTransformedProcedureOutput<TProcedure>> | undefined>, options?: SetDataOptions): void;
/**
* @link https://react-query.tanstack.com/reference/QueryClient#queryclientgetquerydata
* @link https://tanstack.com/query/v4/docs/reference/QueryClient#queryclientgetquerydata
*/
getData(input?: inferProcedureInput<TProcedure>): inferTransformedProcedureOutput<TProcedure> | undefined;
/**
* @link https://react-query.tanstack.com/reference/QueryClient#queryclientgetquerydata
* @link https://tanstack.com/query/v4/docs/reference/QueryClient#queryclientgetquerydata
*/

@@ -60,0 +60,0 @@ getInfiniteData(input?: inferProcedureInput<TProcedure>): InfiniteData<inferTransformedProcedureOutput<TProcedure>> | undefined;

@@ -7,3 +7,3 @@ 'use strict';

var server = require('@trpc/server');
var getArrayQueryKey = require('../getArrayQueryKey-24927615.js');
var getArrayQueryKey = require('../getArrayQueryKey-671d083c.js');
var shared = require('@trpc/server/shared');

@@ -10,0 +10,0 @@ require('@trpc/client');

{
"name": "@trpc/react-query",
"version": "10.5.0",
"version": "10.6.0",
"description": "tRPC React lib",

@@ -57,4 +57,4 @@ "author": "KATT",

"@tanstack/react-query": "^4.3.8",
"@trpc/client": "10.5.0",
"@trpc/server": "10.5.0",
"@trpc/client": "10.6.0",
"@trpc/server": "10.6.0",
"react": ">=16.8.0",

@@ -65,4 +65,4 @@ "react-dom": ">=16.8.0"

"@tanstack/react-query": "^4.3.8",
"@trpc/client": "10.5.0",
"@trpc/server": "10.5.0",
"@trpc/client": "10.6.0",
"@trpc/server": "10.6.0",
"@types/express": "^4.17.12",

@@ -81,3 +81,3 @@ "@types/node": "^18.7.20",

},
"gitHead": "c7f2d301cb1ab5713bf8b4e7dcaa05d66311cc9f"
"gitHead": "96bf1570091557de433533d4cab5f37cb256de1c"
}

@@ -21,3 +21,3 @@ <p align="center">

Full documentation for `@trpc/react-query` can be found [here](https://trpc.io/docs/react-queries)
Full documentation for `@trpc/react-query` can be found [here](https://trpc.io/docs/react-query)

@@ -24,0 +24,0 @@ ## Installation

@@ -26,3 +26,3 @@ export type QueryType = 'query' | 'infinite' | 'any';

{
...(input && { input: input }),
...(typeof input !== 'undefined' && { input: input }),
...(type && type !== 'any' && { type: type }),

@@ -29,0 +29,0 @@ },

export * from './proxy/decorationProxy';
export * from './proxy/utilsProxy';
export * from './proxy/useQueriesProxy';
export type {

@@ -7,4 +8,5 @@ DecoratedProcedureRecord,

} from '../createTRPCReact';
export type { TRPCUseQueries } from '../internals/useQueries';
export * from './hooks/createHooksInternal';
export * from './queryClient';
export * from './types';

@@ -39,3 +39,3 @@ import {

/**
* @link https://react-query.tanstack.com/guides/prefetching
* @link https://tanstack.com/query/v4/docs/reference/QueryClient#queryclientfetchquery
*/

@@ -52,3 +52,3 @@ fetch(

/**
* @link https://react-query.tanstack.com/guides/prefetching
* @link https://tanstack.com/query/v4/docs/reference/QueryClient#queryclientfetchinfinitequery
*/

@@ -65,3 +65,3 @@ fetchInfinite(

/**
* @link https://react-query.tanstack.com/guides/prefetching
* @link https://tanstack.com/query/v4/docs/reference/QueryClient#queryclientprefetchquery
*/

@@ -78,3 +78,3 @@ prefetch(

/**
* @link https://react-query.tanstack.com/guides/prefetching
* @link https://tanstack.com/query/v4/docs/reference/QueryClient#queryclientprefetchinfinitequery
*/

@@ -92,3 +92,3 @@ prefetchInfinite(

/**
* @link https://react-query.tanstack.com/guides/query-invalidation
* @link https://tanstack.com/query/v4/docs/reference/QueryClient#queryclientinvalidatequeries
*/

@@ -102,3 +102,3 @@ invalidate(

/**
* @link https://react-query.tanstack.com/reference/QueryClient#queryclientrefetchqueries
* @link https://tanstack.com/query/v4/docs/reference/QueryClient#queryclientrefetchqueries
*/

@@ -112,3 +112,3 @@ refetch(

/**
* @link https://react-query.tanstack.com/guides/query-cancellation
* @link https://tanstack.com/query/v4/docs/reference/QueryClient#queryclientcancelqueries
*/

@@ -121,3 +121,3 @@ cancel(

/**
* @link https://react-query.tanstack.com/reference/QueryClient#queryclientresetqueries
* @link https://tanstack.com/query/v4/docs/reference/QueryClient#queryclientresetqueries
*/

@@ -130,3 +130,3 @@ reset(

/**
* @link https://react-query.tanstack.com/reference/QueryClient#queryclientsetquerydata
* @link https://tanstack.com/query/v4/docs/reference/QueryClient#queryclientsetquerydata
*/

@@ -146,3 +146,3 @@ setData(

/**
* @link https://react-query.tanstack.com/reference/QueryClient#queryclientgetquerydata
* @link https://tanstack.com/query/v4/docs/reference/QueryClient#queryclientsetquerydata
*/

@@ -159,3 +159,3 @@ setInfiniteData(

/**
* @link https://react-query.tanstack.com/reference/QueryClient#queryclientgetquerydata
* @link https://tanstack.com/query/v4/docs/reference/QueryClient#queryclientgetquerydata
*/

@@ -167,3 +167,3 @@ getData(

/**
* @link https://react-query.tanstack.com/reference/QueryClient#queryclientgetquerydata
* @link https://tanstack.com/query/v4/docs/reference/QueryClient#queryclientgetquerydata
*/

@@ -170,0 +170,0 @@ getInfiniteData(

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc