-
Notifications
You must be signed in to change notification settings - Fork 16
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
react-api: stats request uses POST for big queries/queryParameters #656
react-api: stats request uses POST for big queries/queryParameters #656
Conversation
This pull request has been linked to Shortcut Story #306016: Support for long queries in Builder. |
Pull Request Test Coverage Report for Build 4809279272
💛 - Coveralls |
}); | ||
|
||
test('query source - big queryParameters, should return stats using POST', async () => { | ||
const huugeQueryParameters = Array.from(Array(5000)).reduce((r, _, i) => { |
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.
😄 niiiiiiiiice
expect(res).toEqual(QUERY_TEST.output); | ||
|
||
expect(fetchMock).toBeCalledWith(QUERY_TEST.url, { | ||
method: 'POST', |
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.
@zbigg Should we check the method: 'GET'
in the previous tests?
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.
GET is default in fetch
api, and this assertion is exact match, so we should be safe
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.
LGTM
93a45a5
to
465c702
Compare
465c702
to
64feed9
Compare
Description
Shortcut: https://app.shortcut.com/cartoteam/story/306016/support-for-long-queries-in-builder
@carto/react-api
stats
request suport for long queries or queryParameters by using POST is get URL exceeds certain limits.Type of change
Acceptance
Please describe how to validate the feature or fix
If feature deals with theme / UI or internal elements used also in CARTO 3, please also add a note on how to do acceptance on that part.
Basic checklist