Description
Hi, my architectural vision, as well as for example FSD, involves using entities and API slices, the implementation of which requires creating wrapper functions.
Proposal
I suggest implementing a getQueryOptions function that would return a function requiring init and options for the specified method and path.
/* ./entities/sequrity-object/api/query.ts */
export const getSequrityObjectOptions = $api.query.someservice.getQueryOptions('get', '/method');
const Component = () => {
const { data, error, loading } = useQuery(
getSequrityObjectOptions({ params: { testparam: 'test' } }, { enabled: true }),
);
};
Extra
Description
Hi, my architectural vision, as well as for example FSD, involves using entities and API slices, the implementation of which requires creating wrapper functions.
Proposal
I suggest implementing a getQueryOptions function that would return a function requiring init and options for the specified method and path.
Extra