@refinedev/core@4.44.5
版本发布时间: 2023-10-11 22:07:15
refinedev/refine最新发布版本:@refinedev/supabase@5.9.4(2024-09-03 19:48:37)
Patch Changes
-
#5087
88d52d639b9
Thanks @alicanerdurmaz! - feat:meta
props addedliveProvider.subscribe
andliveProvider.publish
methods. From now on, you can usemeta
to distinguish between methods bymeta
.meta
type:import { QueryFunctionContext } from "@tanstack/react-query"; type Fields = Array<string | object | NestedField>; type VariableOptions = | { type?: string; name?: string; value: any; list?: boolean; required?: boolean; } | { [k: string]: any }; type Meta = { dataProviderName?: string; operation?: string; fields?: Fields; variables?: VariableOptions; queryContext?: QueryFunctionContext; [k: string]: any; };
Usage
import { LiveProvider, LiveEvent } from "@refinedev/core"; export const liveProvider = (client: any): LiveProvider => { return { subscribe: ({ channel, types, params, callback, meta }) => { console.log({ meta }); }, publish: ({ channel, type, payload, date, meta }: LiveEvent) => { console.log({ meta }); }, }; };