Open Subwaytime opened 4 months ago
They should be working as of 3.4, which version are you on?
"gql.tada": "^1.3.0",
"@0no-co/graphqlsp": "^1.4.2",
"villus": "^3.4.0"
Could it be the typescript configuration? - I am also using bun, so not sure if that might be a cause..
Create a repo where this is visible and I will take a look.
Sure, will try to set something up thats similiar! Might take some time, hopefully thats okay
https://github.com/Subwaytime/villus-gql-issue - I tried using executeQuery
and executeMutation
and it has the same result. In the tada.ts
is the gql request and data is always a Ref<any>
.
Note: The repo is similiar to the actual project aside from the fact that the queries and mutations are usually in an api folder instead of the store.
Essentially when using
useQuery
oruseMutation
, any query/mutation type does not get infered for the data object.This can be fixed if we provide the types directly
However it would be great if these are automatically set, similiar to https://villus.logaretm.com/guide/typescript-codgen/#using-typed-document.
Not sure if this would be possible!