Skip to content

Commit

Permalink
fix required aggregation column
Browse files Browse the repository at this point in the history
  • Loading branch information
skoch-tf authored Jan 3, 2020
1 parent e994f75 commit 3a651a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/resolvers.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export function resolvers(
] = association.target.options.gqMiddleware.queryCount(
(parent, args, context, info) => {
return parent['get' + associationFieldNameType]({
attributes: [[sequelize.fn('count'), 'cnt']],
attributes: [[sequelize.fn('count', '*'), 'cnt']],
...generateFindArgs(sequelize, args),
}).then(result => result[0].get('cnt'));
}
Expand Down

0 comments on commit 3a651a1

Please sign in to comment.