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
Dynamic params in edge API routes #48263
Comments
I have updated next to the latest canary version - same result
|
I am having this same issue on edge runtime with dynamic segments, accessing params props on the page, throws type error.
|
Ensures we have coverage for edge API routes in pages so we don't regress. Closes: #48263
Folks you have introduced a breaking change in 13.3 with zero documentation. It breaks assumptions and there is hardly anything in your CI to prevent breaking the build. To add more colour to the above. Considering that your edge functions API is hardly that stable and there is no way to access the query accept parsing the actual URL (part of your docs) changing the query parameters by prefixing is going to break things! |
Any news on this issue? |
This was fixed on next@canary. New stable going out today/tomorrow 👍 |
Fixed! Updated example repo 👌 |
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Verify canary release
Provide environment information
Which area(s) of Next.js are affected? (leave empty if unsure)
No response
Link to the code that reproduces this issue
https://github.com/vitalikda/edge-api-route-dynamic-params
To Reproduce
Create edge api route with dynamic param and try to access it in production
Describe the Bug
When you try to access dynamic params from url, it’s prepend with nextParam string in production, so you can’t access the param
Example
Edge Api route: https://github.com/vitalikda/edge-api-route-dynamic-params/blob/main/src/pages/api/%5Bid%5D/index.ts
Looking at the next url, there is prefix nextParam -
?nextParamid=hello-world
Here is repo: https://github.com/vitalikda/edge-api-route-dynamic-params
Here is preview: https://edge-api-route-dynamic-params.vercel.app/
Expected Behavior
Url search param should be accessible as in nodejs runtime
Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
Vercel
The text was updated successfully, but these errors were encountered: