-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feathers client service hooks get skipped. #106
Comments
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 feathers-batch/client/index.js Line 68 in 9155700
You would then not use the // Pass the manger in explicitly and remove excludes
const collectBatches = manager => async context => {
const { method, path } = context;
const args = makeArguments(context);
const payload = [method, path, ...args];
const batchPromise = new Promise((resolve, reject) => manager.addBatchCall({
resolve,
reject,
payload
}));
context.result = await batchPromise;
return context;
}; // Use the hook manually
import { BatchManger, collectBatches } from 'feathers-batch';
const manager = new BatchManager()
const batchHook = collectBatches(manager);
// use batchHook wherever you want |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: