-
Notifications
You must be signed in to change notification settings - Fork 321
feat(labrinth): dependents api endpoint #4105
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
base: main
Are you sure you want to change the base?
Conversation
…ependents-api # Conflicts: # apps/labrinth/src/routes/v3/projects.rs
Could you please run |
a83cae9
to
31f34d8
Compare
@AlexTMjugador Went ahead and ran cargo fmt && cargo clippy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should wait for @AlexTMjugador to rerev but LGTM
One thing that should be considered by the team before merging this is if it's the right way to introduce this. In my mind, the preferred way to do this would be via the search route, since it would allow for searching, filtering, and pagination out of the box, and would be a nice way to enhance the search experience as well, since people could include or exclude addons for certain mods and stuff. I know we prototyped this in the past and I believe we ran into some performance issues since it added way too many additional parameters to the search index, but I wonder if a closer re-evaluation of that idea could lead to a better solution. |
Having it be something that the search route supports also means you wouldn't need to make extra requests for each dependent to figure out if it's compatible with a specific loader, which is something i'll be doing with this endpoint currently |
If it does end up going through search, it would be interesting to see the dependents of specific version as well instead of only the project as a whole |
Yup, since search is already on a per-version basis it would theoretically even allow you to combine filters, so like "fabric versions with x dependency" or something. Still can't speak on the actual backend impl or if it is feasible performance-wise without tanking the search index's responsiveness |
After discussion with the team, we do think it's feasible and quite easy to add the deps to the search index, so that's probably the route we'd like to take with this issue. Maybe @Geometrically could give a little context on how he'd impl this if you'd like to adapt this PR to do that? |
Implements a new /dependents endpoint to get a list of all the projects (and versions) that depend on a specific mod, example: getting a list of all mods depending on
create
.