-
Notifications
You must be signed in to change notification settings - Fork 1k
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
path param overwrites cell result #2962
Comments
Note that this is still the case: redwood/packages/web/src/components/createCell.tsx Lines 271 to 274 in 818fbb1
Switching these two around would fix the bug. For reference, redwood/packages/web/src/components/createCell.tsx Lines 249 to 253 in 818fbb1
I think the logic for spreading But we could take |
We discussed this at our last meeting. The team's thoughts were that the Cell's result should win out over the path, but a better way of solving this would be to just throw some sort of a descriptive error before things get to this point. The error would be thrown if the Cell's result and the path share the same name. |
Description of bug
If one of your path params has the same name as the structure returned by a cell query, the cell result will be overwritten by the path param value.
Path:
SDL:
Query:
Success:
Output
Expected
Fix
Workaround
I can easily fix this in my code by making the query look like this (renaming the result to just
invite
)Proposed solution
I think RW should make the result have precedence over the path parameters. And probably also document this behavior no matter how it's decided it should be handled.
The text was updated successfully, but these errors were encountered: