Closed
Description
In my application right now I've been aggregating database entries and serving them in a REST API. Though when it comes to graphene I've not had any luck getting aggregates to works. Any help would be thankful
Current code:
aggregated_snapshots = DjangoFilterConnectionField(IssueSnapshotNode)
def resolve_aggregated_snapshots(self, info, **kwargs):
return IssueSnapshot.objects.order_by() \
.values('status', type=F('issue__type_name')) \
.annotate(status_count=Count('status'))
Error message returned:
Merging 'QuerySet' classes must involve the same values in each case