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

Query Options mutator creates a hook instead of simple function #1275

Open
matusgallik opened this issue Mar 20, 2024 · 4 comments
Open

Query Options mutator creates a hook instead of simple function #1275

matusgallik opened this issue Mar 20, 2024 · 4 comments
Labels
enhancement New feature or request tanstack-query TanStack Query related issue

Comments

@matusgallik
Copy link

What are the steps to reproduce this issue?

  1. use the following config:
override: {
				query: {
					shouldExportMutatorHooks: false,
					queryOptions: {
						path: './mutator.ts',
						name: 'customQueryOptions',
					},
}}
  1. The generated helper functions to get query options follow the pattern use*QueryOptions.
  2. remove the queryOptions from the config
  3. the generated helper function is now called get*QueryOptions

What happens?

The function call to get the query options for a route become ahook.

What were you expecting to happen?

The name not to change comapred to the default settings

Any logs, error output, etc?

None

Any other comments?

This makes it rather difficult the use the option functions with eslint hook rules.

What versions are you using?

Operating System: Linux
Package Version: 6.25.0
Browser Version: N/A ?

@melloware melloware added the enhancement New feature or request label Mar 20, 2024
@matusgallik
Copy link
Author

@melloware is this an enhancement or a bug? Or differently; is this intended behavior? Thanks

@melloware
Copy link
Collaborator

I am not sure that is why I labeled it an enhancement because I wasn't sure if it was intended behavior or a bug...

@melloware melloware added the tanstack-query TanStack Query related issue label Apr 18, 2024
@matusgallik
Copy link
Author

@melloware any update on this?

@melloware
Copy link
Collaborator

No update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request tanstack-query TanStack Query related issue
Projects
None yet
Development

No branches or pull requests

2 participants