You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because feathers-batch is a global hook it does not run individual service hooks that may add data or perform ETL functions.
I think that if we added global after hooks that could be added after all service hooks for front end and back end hooks would be wonderful and would solve this problem.
(First please check that this issue is not already solved as described
here)
Tell us what broke. The more detailed the better.
feathers client hooks do not run on batched calls. Because it is a global hook.
If you can, please create a simple example that reproduces the issue and link to a gist, jsbin, repo, etc.
Expected behavior
Tell us what should happen
I think the batched hook should run after each service hook runs.
Actual behavior
Tell us what happens instead
System configuration
Tell us about the applicable parts of your setup.
Module versions (especially the part that's not working):
NodeJS version:
Operating System:
Browser Version:
React Native Version:
Module Loader:
The text was updated successfully, but these errors were encountered:
This totally makes sense. I would like to see the client side server hooks run as well. Perhaps a good solution is to export a modified version of the collectBatches hook and allow the developer to use it explicitly.
You would then not use the batchClient plugin and would use the collectBatches hook directly. Something like this
// Pass the manger in explicitly and remove excludesconstcollectBatches=manager=>asynccontext=>{const{ method, path }=context;constargs=makeArguments(context);constpayload=[method,path, ...args];constbatchPromise=newPromise((resolve,reject)=>manager.addBatchCall({
resolve,
reject,
payload
}));context.result=awaitbatchPromise;returncontext;};
// Use the hook manuallyimport{BatchManger,collectBatches}from'feathers-batch';constmanager=newBatchManager()constbatchHook=collectBatches(manager);// use batchHook wherever you want
Steps to reproduce
Because feathers-batch is a global hook it does not run individual service hooks that may add data or perform ETL functions.
I think that if we added global after hooks that could be added after all service hooks for front end and back end hooks would be wonderful and would solve this problem.
(First please check that this issue is not already solved as described
here)
feathers client hooks do not run on batched calls. Because it is a global hook.
Expected behavior
Tell us what should happen
I think the batched hook should run after each service hook runs.
Actual behavior
Tell us what happens instead
System configuration
Tell us about the applicable parts of your setup.
Module versions (especially the part that's not working):
NodeJS version:
Operating System:
Browser Version:
React Native Version:
Module Loader:
The text was updated successfully, but these errors were encountered: