-
Notifications
You must be signed in to change notification settings - Fork 13
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
Optional arguments are sent as undefined #16
Comments
Looks like @kahirokunn opened a PR for this earlier. We'll just want to add test cases for that (sorry I missed them 😞) and then I'd recommend using the CSB build. |
@Richard87 Can you confirm you're using |
@Richard87 Would you mind trying this version of rtk-query in your project and reporting back? yarn add https://pkg.csb.dev/rtk-incubator/rtk-query/commit/8d6e1c9b/@rtk-incubator/rtk-query |
Hi! Yes, I'm using FetchBaseQuery here is my generated file: https://gist.github.com/Richard87/c29f22ca2649afe237c73fcd9853195b (I replaced I can confirm at the commit over (https://pkg.csb.dev/rtk-incubator/rtk-query/commit/8d6e1c9b/@rtk-incubator/rtk-query) does not have the bug :) |
#16 (comment) |
Alright, released |
Hi!
I have this definition:
When I run
const {data, ...response} = useApiCoursesJobsGetSubresourceQuery({id: 27, itemsPerPage: 100, page:1})
withoutpage
oritemsPerPage
, they are included in the request as string values"undefined"
, with a 400 Bad request error message from the API...Does this bug belong in rtk-query-codegen or in rtk-query, or something I should fix on my end? :)
The text was updated successfully, but these errors were encountered: