Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use SEARCH instead of GET to fetch filtered data in frontend #6180

Closed
wants to merge 6 commits into from
Closed

Use SEARCH instead of GET to fetch filtered data in frontend #6180

wants to merge 6 commits into from

Conversation

paescuj
Copy link
Member

@paescuj paescuj commented Jun 10, 2021

Closes #5540

Tested on Firefox, works like a charm.

Note: There is an open pull request from @rijkvanzanten for axios to accept method 'search' (string to be exact), however it is already working (just a TS warning) - see axios/axios#3802

@paescuj paescuj changed the title Use SEARCH instead of GET to fetch data Use SEARCH instead of GET to fetch data in list-o2m Jun 10, 2021
@rijkvanzanten
Copy link
Member

@paescuj Should we just update every get in the app with search? I can already imagine 3 other places where this same issue might show up in the future, like list-m2m, list-m2a, but also things like batch edit for files, etc 🤔

@paescuj
Copy link
Member Author

paescuj commented Jun 10, 2021

Sure, I can update all the list interfaces 👍
Not sure about the other stuff, we just need to replace GET requests where the query could grow big.
If you'd provide a list of other places, I'm going to update those as well.

@paescuj paescuj changed the title Use SEARCH instead of GET to fetch data in list-o2m Use SEARCH instead of GET to fetch data in relational interfaces Jun 11, 2021
@paescuj paescuj changed the title Use SEARCH instead of GET to fetch data in relational interfaces Use SEARCH instead of GET to fetch filtered data in frontend Jun 11, 2021
@paescuj
Copy link
Member Author

paescuj commented Jun 11, 2021

I've converted all api.get requests with a filter which could potentially become big.

Do you think we should update other requests too?
E.g.:

const foldersToUpdate = await api.get('/folders', {
params: {
filter: {
parent: {
_eq: props.folder.id,
},
},
},
});

@rijkvanzanten
Copy link
Member

This is superseded by #12082

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use SEARCH instead of GET for o2m relational interfaces
2 participants