graphql-zeus icon indicating copy to clipboard operation
graphql-zeus copied to clipboard

usetypedquery does not accept variables

Open RyanDurk opened this issue 3 years ago • 0 comments

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", })

RyanDurk avatar Feb 09 '22 12:02 RyanDurk