-
Notifications
You must be signed in to change notification settings - Fork 671
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
Does not support array query string parameters #214
Comments
Wow would be really nice to get this merged in! |
I am also waiting for this to get merged. |
Is there an ETA on this merge? |
@sapessi any chance we can get this merged before the next release? |
Hi @alexmantaut. My next step is to start looking into the v4 branch and publish a major update to the library. I'll get this change in there. |
Any update ? |
Hello, is there some workaround that can be used while waiting for this issue to be fixed? |
After searching around the code a little, I came up with a temporary hack in my code that overrides the import produce from 'immer';
// Do setup...
const nextEvent = produce(event, (draftEvent) => {
// [22-05-2020]:
// A bug in aws-serverless-express prevents proper
// handling of multi value query string params.. Therefore, apply this hack to
// force aws-serverless-express to take multi value query string params...
// This hack should be removed after this issue is fixed:
// https://github.com/awslabs/aws-serverless-express/issues/214
// eslint-disable-next-line @typescript-eslint/no-explicit-any
draftEvent.queryStringParameters = event.multiValueQueryStringParameters as any;
});
// Return the new instance
return proxy(cachedServer, nextEvent, context, 'PROMISE').promise; Perhaps this may help someone until the proper fix is published. |
Hi @pejulian, For my project what I ended up doing is patching the library manually inside the node_modules dir, and converting that into a patch by using patch-package. What patch-package does is, it creates a patch that gets applied after yarn install. I know this is not an ideal solution, but this bug was wasting too much of my time on workarounds... |
🎉 This issue has been resolved in version 4.1.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
aws-serverless-express cannot parse array query string parameters
For example
?a=1&a=2
exposes only{a: 1}
to express. Normally this would result in{a: [1, 2]}
API Gateway supports array query string parameters using
multiValueQueryStringParameters
instead of
queryStringParameters
.https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-lambda-proxy-integrations.html#apigateway-multivalue-headers-and-parameters
The text was updated successfully, but these errors were encountered: