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

Unable to Configure placeholderData Option for React Query in Orval Config #1579

Open
ekhishigee opened this issue Aug 16, 2024 · 1 comment
Labels
tanstack-query TanStack Query related issue

Comments

@ekhishigee
Copy link

What are the steps to reproduce this issue?

  1. Set up a React project using React Query and Orval for API generation.
  2. Try to configure the placeholderData option for React Query in the Orval config.
  3. Notice that there is no clear documentation or option in Orval's config for setting placeholderData.

What happens?

I am unable to configure the placeholderData option for React Query through the Orval configuration file. The generated hooks do not include placeholderData, and there is no option available in the Orval configuration to add it.

What were you expecting to happen?

I expected to find an option in the Orval configuration that allows me to define placeholderData for React Query hooks so that it can be automatically included in the generated hooks.

Any logs, error output, etc?

No error output, just missing configuration in the generated code.

Any other comments?

It would be helpful to have documentation or an example showing how to set up placeholderData within the Orval config for React Query.

What versions are you using?

System:
    OS: macOS 14.5
    CPU: (8) x64 Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz
    Memory: 40.27 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  npmPackages:
    @tanstack/react-query: 5.51.21 => 5.51.21 
    axios: 1.7.3 => 1.7.3 
    orval: 7.0.1 => 7.0.1 
    react: 18.3.1 => 18.3.1 
@melloware melloware added the tanstack-query TanStack Query related issue label Aug 16, 2024
@melloware
Copy link
Collaborator

i dont remember seeing placeholderData before I wonder if that is a newer TanStack Query feature and it was just never implemented in Orval. PR is welcome!

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

No branches or pull requests

2 participants