graphql-engine/v3/crates
Rakesh Emmadi d5909e8c48 Fix permission filter usage reporting in query analytics (#933)
<!-- The PR description should answer 2 important questions: -->

### What

<!-- What is this PR trying to accomplish (and why, if it's not
obvious)? -->

<!-- Consider: do we need to add a changelog entry? -->

<!-- Does this PR introduce new validation that might break old builds?
-->

<!-- Consider: do we need to put new checks behind a flag? -->
Fields involved in the relationship's inner predicates were incorrectly
reported as fields of the root model. This PR resolves the issue. Also,
fixes the predicates inside `And` or `Or` are not reported.

Note: Changelog not required, as query usage analytics are Hasura
internal and hidden from users.
### How

<!-- How is it trying to accomplish it (what are the implementation
steps)? -->
- Use `for` loop instead of `Iterator map` to avoid confusion around the
execution of lambda passed to the `map` function (more context in this
[slack](https://hasurahq.slack.com/archives/C04PUMV4X16/p1722871834852519)
thread)
- Introduce a new struct, to report predicate relationship fields, that
has a field to report its inner filter predicate usage.

V3_GIT_ORIGIN_REV_ID: 9ca23e6005ccb09f2321a2ae30ef575f99e84e06
2024-08-06 05:57:25 +00:00
..
auth add a flag to log traces to stdout (#931) 2024-08-05 08:29:46 +00:00
custom-connector Bug fixes around argument presets in the DataConnectorLink (#866) 2024-08-02 09:25:45 +00:00
engine Refactor SQL layer to use OpenDD query IR (#925) 2024-08-05 23:38:19 +00:00
execute Fix permission filter usage reporting in query analytics (#933) 2024-08-06 05:57:25 +00:00
ir avoid using raw Strings in more places (#923) 2024-08-05 22:27:47 +00:00
lang-graphql Explicitly import thiserror::Error in place (#827) 2024-07-11 15:18:27 +00:00
metadata-resolve avoid using raw Strings in more places (#923) 2024-08-05 22:27:47 +00:00
metadata-schema-generator Move all dependency versions into the workspace file. (#734) 2024-06-20 12:25:55 +00:00
open-dds Refactor SQL layer to use OpenDD query IR (#925) 2024-08-05 23:38:19 +00:00
plugins/pre-execution-plugin Explicitly import thiserror::Error in place (#827) 2024-07-11 15:18:27 +00:00
query-usage-analytics Fix permission filter usage reporting in query analytics (#933) 2024-08-06 05:57:25 +00:00
schema Refactor SQL layer to use OpenDD query IR (#925) 2024-08-05 23:38:19 +00:00
sql Refactor SQL layer to use OpenDD query IR (#925) 2024-08-05 23:38:19 +00:00
utils add a flag to log traces to stdout (#931) 2024-08-05 08:29:46 +00:00