const { data } = useQuery<PostsQuery, PostsQueryVariables>({
query: Posts
variables: {
// variables are now typed as PostsQueryVariables
},
});
data.value; // is now typed as PostsQuery type!
This does not appear to work when using executeQuery instead of useQuery. In the villus.d.ts file the following signature is found:
In the documentation https://villus.logaretm.com/guide/typescript-codgen/#using-generated-queries it shows the following code example:
This does not appear to work when using
executeQuery
instead ofuseQuery
. In thevillus.d.ts
file the following signature is found:Is it as simple as adding
TData
toOperationResult
?