-
-
Notifications
You must be signed in to change notification settings - Fork 347
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
feat(query): support custom-fetch-hook #1632
base: master
Are you sure you want to change the base?
feat(query): support custom-fetch-hook #1632
Conversation
Looks like build is failing? |
Thank you for nice enhance ! |
I've thought about this, and I'd like to have no |
@izumin5210 |
if (mutator?.isHook) { | ||
const fetchImplementationBody = `return ${operationName}(${fetchFnOptions});`; | ||
fetchImplementation = `export const use${pascal(operationName)}Hook = (): (${args}) => ${retrunType} => { | ||
const ${operationName} = ${mutator.name}<Awaited<${retrunType}>>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since operationName
is confusing, how about naming it something like customHook
, customMutator
, or mutator
, which makes it clear that it is a custom hook?
const ${operationName} = ${mutator.name}<Awaited<${retrunType}>>(); | |
const customHook = ${mutator.name}<Awaited<${retrunType}>>(); |
Status
READY
Description
Currently, Orval generates broken code when
mutator
is customfetch
client hook.Todos
Steps to Test or Reproduce
You can check by using sample app.