Builds bounded, source-aware sparse return projections for FQL1 queries.
The input query must start with FROM runs or FROM events and must not already contain a RETURN clause.
FROM runs
FROM events
RETURN
@type field() :: atom() | {:attribute, binary()} | {:state_meta, binary(), binary()} | {:event_field, binary()}
@type shape() :: :record | :records
@spec project(binary(), shape(), [field()]) :: {:ok, binary()} | {:error, {:invalid_flow_query_projection, atom()}}