-
Hello! Lets say I wanted to let users define custom fields for all TodoItems (ex:
{
id: 1,
title: 'Fix the washing machine',
// other fields...
custom: {
cost: 100,
dueDate: 25/09/2023
}
} When I enable the aggregation, it would be really cool if it could generate some kind of custom field so that I could for example, compute the total cost of the TodoItem. type TodoItemSumAggregate {
id: Float
priority: Float
+++ custom(customFieldID: String!): Float
} Then, the graphql query would look like: {
todoItemAggregate {
sum {
custom(customFieldID: "cost")
}
} And then somewhere, I would create my own Has anyone faced a similar use case? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You could add the field with an |
Beta Was this translation helpful? Give feedback.
You could add the field with an
@FilterableField
to the DTO definition used by the aggregation and than overwrite the resolver / service to fetch the data the correct way.