We want to have only query based insights frontend side, but we still need to send them to the backend with filters. The bigger goal of the coming PRs is to adapt all instances where we send insights to the backend for persistance with a wrapper function, so that the frontend can happily live with query based insights only.
Changes
This PR lets all instances of renameInsight take a query based insight and conditionally:
sends it with filters or query to the backend, based on a feature flag
returns it with filters or query, based on a boolean value -> work is in progress to set this to true everywhere
Problem
We want to have only query based insights frontend side, but we still need to send them to the backend with
filters
. The bigger goal of the coming PRs is to adapt all instances where we send insights to the backend for persistance with a wrapper function, so that the frontend can happily live with query based insights only.Changes
This PR lets all instances of
renameInsight
take a query based insight and conditionally:filters
orquery
to the backend, based on a feature flagfilters
orquery
, based on a boolean value -> work is in progress to set this totrue
everywhereHow did you test this code?