Skip to content

usetypedquery does not accept variables #252

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

Closed
RyanDurk opened this issue Feb 9, 2022 · 0 comments
Closed

usetypedquery does not accept variables #252

RyanDurk opened this issue Feb 9, 2022 · 0 comments

Comments

@RyanDurk
Copy link

RyanDurk commented Feb 9, 2022

React-query 3.34.7 usequery is working great, but usetypedmutation isn't working with variables. Here's the code that fails for me--

const createRequest = useTypedMutation("createRequest", {
    createRequest: [
      {
        input: {
          request: {
            userId: 181,
            orgId: 18,
            scheduleId: 10,
            day: $`day`,
          },
        },
      },
      { clientMutationId: true },
    ],
  })

fails (createRequest.mutate expects variables to be a void type --

createRequest.mutate({ day: "2022-10-10", })

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

No branches or pull requests

2 participants