@@ -10,7 +10,7 @@ import { parseResult, useQueryPublic } from './internal/use-query-public.js';
1010import type { DiffEntry , PublishDiffInfo } from './types.js' ;
1111
1212type QueryParams < S extends Entity . AnyNoContext > = {
13- mode ?: 'merged' | 'public' | 'local ' ;
13+ mode ?: 'merged' | 'public' | 'private ' ;
1414 filter ?: { [ K in keyof Schema . Schema . Type < S > ] ?: Entity . EntityFieldFilter < Schema . Schema . Type < S > [ K ] > } | undefined ;
1515 // TODO: for multi-level nesting it should only allow the allowed properties instead of Record<string, Record<string, never>>
1616 include ?: { [ K in keyof Schema . Schema . Type < S > ] ?: Record < string , Record < string , never > > } | undefined ;
@@ -148,7 +148,7 @@ const preparePublishDummy = () => undefined;
148148export function useQuery < const S extends Entity . AnyNoContext > ( type : S , params ?: QueryParams < S > ) {
149149 const { mode = 'merged' , filter, include } = params ?? { } ;
150150 const publicResult = useQueryPublic ( type , { enabled : mode === 'public' || mode === 'merged' , include } ) ;
151- const localResult = useQueryLocal ( type , { enabled : mode === 'local ' || mode === 'merged' , filter, include } ) ;
151+ const localResult = useQueryLocal ( type , { enabled : mode === 'private ' || mode === 'merged' , filter, include } ) ;
152152 const mapping = useSelector ( store , ( state ) => state . context . mapping ) ;
153153 const generateCreateOps = useGenerateCreateOps ( type , mode === 'merged' ) ;
154154 const generateUpdateOps = useGenerateUpdateOps ( type , mode === 'merged' ) ;
@@ -168,7 +168,7 @@ export function useQuery<const S extends Entity.AnyNoContext>(type: S, params?:
168168 } ;
169169 }
170170
171- if ( mode === 'local ' ) {
171+ if ( mode === 'private ' ) {
172172 return {
173173 ...publicResult ,
174174 data : localResult . entities ,
0 commit comments