Skip to content
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

fix(query): vue-query generates undefined function "useCallback" #1902

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wiz-tajima
Copy link

@wiz-tajima wiz-tajima commented Feb 16, 2025

Status

READY

Description

Fix #1872

Related PRs

List related PRs against other branches:

branch PR
N/A N/A

Todos

  • Tests
  • Documentation
  • Changelog Entry (unreleased)

※ I did tests with husky and generating samples made from my project

Steps to Test or Reproduce

  1. make files to set override: mutator, formData and query.
  2. make orval.config.ts with property below:
client: 'vue-query',
override: {
          mutator: {
            path: "./mutator/use-custom-instance.ts",
            name: "useCustomInstance",
          },
          formData: {
            path: "./mutator/custom-form-data.ts",
            name: "customFormData",
          },
          query: {
            queryOptions: {
              path: "./mutator/custom-query-options.ts",
              name: "customQueryOptions",
            },
}
  1. generate.
    Before fix, it will generate file using method "useCallback" on all client.
    After fix, it will generate file without useCallback on vue-query client while the other clients will execute as before.

@melloware
Copy link
Collaborator

LGTM but i would like @anymaniax to review this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Vue Query: It generates undefined function "useCallback"
3 participants