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

user.cards() - Increased limit (currently 50) #617

Open
jmallot21 opened this issue Sep 10, 2024 · 4 comments
Open

user.cards() - Increased limit (currently 50) #617

jmallot21 opened this issue Sep 10, 2024 · 4 comments

Comments

@jmallot21
Copy link

Currently, only 50 cards can be retrieved per page for the user.cards() and currentUser.cards() methods.

Managers often have a lot of cards, which makes it too time-consuming to retrieve their complete roster.

Could you please increase this limit to 500?

query getCardsOfUser{
                          user(slug: "p0uet21-sorarenbajet") {
                            slug nickname
                            cards(sport:NBA first:500) {
                              pageInfo { hasNextPage endCursor }
                              nodes {
                                assetId slug
                              }
                          }
}
@redox
Copy link
Member

redox commented Sep 10, 2024

This is a soft limit of our API that we won’t unfortunately loose/increase, it’s important for the stability of the platform. I think you should find a way to not need to retrieve everything every time.

what’s missing for you to avoid having to fetch everything every time?

@jmallot21
Copy link
Author

Thanks @redox,

I understand, but it's not that simple.
I've currently set a 3-minute cache on a manager's card retrieval so that he doesn't have to make all those calls again every time a page loads.

Unfortunately, managers often buy cards in the last few minutes before Gameweek starts, so I need to have the freshest data possible.

And going from 50 to 100? Do you think this could be a problem?
Knowing that the complexity and depth limit wouldn't change. So you can control your returns and keep the platform stable.

What do you think about that ?
Thanks.

@redox
Copy link
Member

redox commented Sep 11, 2024

What if instead we expose a way for you to understand what has been added/removed from the user gallery since a date?

@jmallot21
Copy link
Author

Having a list of card movements (filtered by sport) based on a date would be great.
A workaround to make sure you don't forget anything.
Thanks for the suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants