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

TypedDocumentNode losing result typing when arguments are passed to query

Open thdxr opened this issue 3 years ago • 2 comments

I'm seeing an issue where when I have the following query, everything works right:

ZeusTD({
  myQuery: { id: true, other: true }
})

However anything requiring arguments loses the return type

ZeusTD({
  myQuery: [ { foo: "arg"}, { id: true, other: true }]
})

thdxr avatar Apr 27 '22 17:04 thdxr

I poked around and using a similiar type signature to the useTypedQuery from the react-query plugin fixes the issue

thdxr avatar Apr 27 '22 19:04 thdxr

Can you provide PR

aexol avatar May 28 '22 09:05 aexol