-
Notifications
You must be signed in to change notification settings - Fork 85
Open
Description
Version: 5.0.6 with feathers version 4.5.11
I'm working with fastJoin and for some reason unable to get it to work. Code:
const postResolvers = {
joins: {
conf: (...args) => async (connection, context) => {
try {
var conf = await context.app.service('con-configs').find({
query: {
type: connection.type
}
});
} catch (error) {
return Promise.reject(new GeneralError(`Error`));
}
connection.conf= conf.data[0];
}
}
};
I'm using this in a before hook:
before: {
find: [
fastJoin(postResolvers)
]
}
Error message:
"TypeError: Cannot read property 'data' of undefined\n at /app/node_modules/feathers-hooks-common/lib/services/fast-join.js:13:48\n at /app/node_modules/feathers-hooks-common/node_modules/@feathersjs/commons/lib/hooks.js:116:46\n at processTicksAndRejections (node:internal/process/task_queues:94:5)"
strarsisstrarsis
Metadata
Metadata
Assignees
Labels
No labels