You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As is the case with many APIs, we now have one where a GET request functions as a "search endpoint." This endpoint supports numerous parameters, potentially enough to exceed the 2048-character URL length limit. While I agree that it might be better to split this functionality into different endpoints or impose stricter limits on the parameters, the decision has been made to take a simpler approach by using a POST request instead. This allows all the parameters to be included in the body of the POST request.
However, this solution disrupts Orval's code generation, as POST requests are typically intended for mutations. Is there a way to "override" the method for this GET endpoint and use a POST request instead?
Thank you for your input!
The text was updated successfully, but these errors were encountered:
override: {mutator: defaultMutator,operations: {project_aggregation_query: {query: {// This is a POST request, since it requires a request body, but is actually a query, not a mutation.// This forces Orval to generate a query instead of a mutation hook.useQuery: true,},},},},
if you use useQuery it will generate a query instead of mutation.
Hello, everyone,
As is the case with many APIs, we now have one where a GET request functions as a "search endpoint." This endpoint supports numerous parameters, potentially enough to exceed the 2048-character URL length limit. While I agree that it might be better to split this functionality into different endpoints or impose stricter limits on the parameters, the decision has been made to take a simpler approach by using a POST request instead. This allows all the parameters to be included in the body of the POST request.
However, this solution disrupts Orval's code generation, as POST requests are typically intended for mutations. Is there a way to "override" the method for this GET endpoint and use a POST request instead?
Thank you for your input!
The text was updated successfully, but these errors were encountered: