Skip to content

Commit

Permalink
Merge pull request #8 from skoch-tf/patch-1
Browse files Browse the repository at this point in the history
fix required aggregation column
  • Loading branch information
stvkoch authored Jan 3, 2020
2 parents e994f75 + 3a651a1 commit e7003f2
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 e7003f2

Please sign in to comment.