Написать SQL-функцию для вычисления computed field для Hasura.io
SQL Function (to aggregate nested table) for "Hasura computed field" can not be tracking: Tracking items failed ... reasons: the function does not return a "COMPOSITE" type AND the function does not return a table
CREATE OR REPLACE FUNCTION agency.task_duration_sum(task_row agency.task) RETURNS NUMERIC AS $$ SELECT SUM( duration ) FROM agency.time_entry WHERE task__id = task_row.id $$ LANGUAGE sql STABLE;
Подробности проблемы и схема данных тут:
https://github.com/hasura/graphql-engine/issues/67...