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): type return of useMutation query #1215

Conversation

david10sing
Copy link
Contributor

@david10sing david10sing commented Feb 11, 2024

Status

READY

Description

Fix #1195

Using orval in a repository where the tsconfig moduleResolution property is not node results in #1195 when producing useMutation queries.

As per the issue, looks like it needs to be fixed properly upstream but in the meantime, this PR puts in a fix which should silence that error for users using orval with moduleResolution set to something newer than node.

Todos

  • Tests
  • Documentation
  • Changelog Entry (unreleased)

Steps to Test or Reproduce

Outline the steps to test or reproduce the PR here.

> git pull --prune
> git checkout <branch>
> grunt jasmine
  1. Run yarn build

@david10sing david10sing force-pushed the fix-add-return-type-to-use-mutation-query branch from 1fa21d6 to 01f8d22 Compare February 11, 2024 00:16
@melloware melloware requested a review from anymaniax February 11, 2024 12:40
@melloware
Copy link
Collaborator

This LGTM but going to let @anymaniax review.

@david10sing
Copy link
Contributor Author

@anymaniax could I get your eyes on this please? Thank you 🙏

@anymaniax
Copy link
Collaborator

Seems good. Why only for react query?

@melloware melloware added this to the 6.26.0 milestone Mar 6, 2024
@david10sing
Copy link
Contributor Author

Seems good. Why only for react query?

Hi @anymaniax,

Sorry for the delay in getting back.

I am using orval with react-query that's why. I am not sure about the other libraries.

@david10sing
Copy link
Contributor Author

@anymaniax,

Updated the mutation queries for react-query, svelte-query and vue-query

@melloware melloware merged commit 9c13f1f into orval-labs:master Mar 9, 2024
2 checks passed
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.

Node16 or bundler module resolution causes TS2742 error
3 participants