Closed melmathari closed 3 days ago
@tusharmath Could you please review this pull request when you have a moment? Thank you for your contributions!
Hey @nocodeventure-nl! Thank you for your contribution to Tailcall 🙏
Unfortunately, we cannot merge this PR as the changes proposed do not align with the requirements in the linked issue. I encourage you to review #2999 once again and open a new PR with the required changes.
Thank you for your understanding 🙌
Prevent Objects in Query Parameters
Problem
Previously, the system allowed objects to be used in HTTP query parameters through the
@http
directive, which could lead to unexpected behavior since query parameters should only contain scalar values.Solution
Added validation to ensure that query parameters only accept scalar values and not objects. The validation:
{{.args.criteria.field}}
)Changes
validate_query_params()
method to theHttp
directive to check query parameter typesExample
Testing
Error Message
When an object is used in a query parameter, users will receive a clear error:
/claim #2999