PromucFlow_constructor/app/server/appsmith-server
sneha122 9b40629ce9
fix: moved js filter to mongoDB (#35826)
## Description
This PR adds an improvement to the actions part of the consolidated view
API, where by it moves the filtering that we do to check if the action
of pluginType JSObject has been moved to MongoDB. This way the mongoDB
query that we do contains pluginTypes to include and we won't have to do
additional filtering at the code layer, there by saving some time that
is spend on further filtering and sanitising each action.

Here are some of the observations for before and after making this
change:

### Case 1:
Before (Total consolidated view api duration ~ 1.72s)
Actions span totally took ~ 1.12s
<img width="1171" alt="Screenshot 2024-08-22 at 9 26 15 PM"
src="https://github.com/user-attachments/assets/2dc69e4f-619a-4b86-9e9b-f1aede63d868">

After (Total consolidated view api duration ~ 1.72s)
Actions span totally took ~ 566ms
<img width="1180" alt="Screenshot 2024-08-22 at 9 33 16 PM"
src="https://github.com/user-attachments/assets/2947da7e-34ae-4933-9adf-7f7433c89c4e">


### Case 2:
Before (Total consolidated view api duration ~ 2.66s)
Actions span totally took ~ 1.67s
<img width="1170" alt="Screenshot 2024-08-22 at 9 34 05 PM"
src="https://github.com/user-attachments/assets/27b046d9-c066-4282-92c3-d1053b820d33">


After (Total consolidated view api duration ~ 2.88s)
Actions span totally took ~ 935ms
<img width="1180" alt="Screenshot 2024-08-22 at 9 34 28 PM"
src="https://github.com/user-attachments/assets/6bf3c47a-27a3-497d-b4ee-debdd5e6f25e">

Note: These numbers are obtained by testing the app with many actions
and js objects [Xolair App]

Fixes #`Issue Number`  
_or_  
Fixes [`Issue
URL`](https://github.com/appsmithorg/appsmith/issues/35815)
> [!WARNING]  
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._

## Automation

/ok-to-test tags="@tag.Datasource"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/10522148136>
> Commit: f0cf9b23c1ca80eb652c5e3a5e3502fdb4dcab59
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10522148136&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Datasource`
> Spec:
> <hr>Fri, 23 Aug 2024 08:34:57 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **New Features**
- Introduced enhanced action retrieval capabilities based on specific
plugin types, allowing for more tailored responses.
- Added new methods to filter actions by application ID and plugin type,
improving granularity in action queries.

- **Bug Fixes**
- Updated existing action retrieval methods to support additional
filtering options, improving the accuracy of returned results.

- **Chores**
- Streamlined query logic in the repository to enhance performance and
maintainability.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: “sneha122” <“sneha@appsmith.com”>
2024-08-23 14:58:32 +05:30
..
src fix: moved js filter to mongoDB (#35826) 2024-08-23 14:58:32 +05:30
auth-notes
pom.xml fix: Fixed GraphQL version (#35310) 2024-07-31 14:54:36 +05:30