Should I create another API endpoint to query all the users liked photo ids. Just for Ids
I have a page that will show the user its liked photo but its on pagination and has all the photos attributes that is large. when user visits the gallery I want to mark photo in that gallery as liked if user already liked it.
If I use the same query function I used in user liked page it will not show all user’s liked photos because its on pagination
Use a different API for that it will be better as you are checking for particular user, use indexing at users_id if not there to make the process faster.