I work with a GraphQL (HotChocolate) API that use EF Core to fetch data from my MS SQL Server.
A few entities have status columns, that are currently created on-demand with a complex query which can be translated to SQL with EF Core. The status is generated with a query of 3-5 tables.
query {
person(where: {status: {eq: Status1}}){
{...}
}
Now I want to make this column filterable with GraphQL, which is currently not possible, because the column is generated in the resolver of the entity.
Is there a good way to filter a computed column with GraphQL or a good solution to store such complex computed columns in the database, which will be updated in a short interval?
I thought to store it in the database and make a CRON Job/SQL Job that updates the value each hour or so, but this solution just doesn't feel right.