Skip to content

Limit amount searches to 20M€ #75

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

Merged
merged 1 commit into from
Mar 2, 2020
Merged

Conversation

hihuz
Copy link
Contributor

@hihuz hihuz commented Mar 2, 2020

Following a comment from @p-janik in app search PR: https://github.com/kontist/figure-app/pull/4867#issuecomment-592493816

I noticed 500 when I typed magic number 123546182646481937464183940. We display skeleton then even if there is no fetch in background.

I looked a bit more and the Int GraphQL scalar type only supports 32 bit integers (see: graphql/graphql-spec#73 (comment)). If we specify a number above that, our GraphQL API will throw.

So I think it's a good idea to not include amount filter in search when user types a number above 20 millions (in euros).
This should be more than enough to cover all use cases.

@hihuz hihuz force-pushed the chore/limit-amount-max-value branch from a097493 to 8b55afa Compare March 2, 2020 10:31
@hihuz hihuz force-pushed the chore/limit-amount-max-value branch from 8b55afa to 5e93ce3 Compare March 2, 2020 10:33
@hihuz hihuz merged commit 621cfd7 into master Mar 2, 2020
@hihuz hihuz deleted the chore/limit-amount-max-value branch April 14, 2020 16:51
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

Successfully merging this pull request may close these issues.

3 participants