You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seem codegen variable generated couldn't support Ref<T> as a variable, and only allow me to pass whole variables as Ref<Variable>
For example, in typescript-vue-urql
// it's okconst{ data, error, fetching, executeQuery, pause, resume, operation }=awaituseArticlesQuery({variables: computed(()=>({after: after.value,locales: locales.value,orderBy: ArticleOrderBy.ViewedAt,order: Order.Desc,first: 5,})),})// but notconst{ data, error, fetching, executeQuery, pause, resume, operation }=awaituseArticlesQuery({variables: {after: after,// after is Ref<string>locales: locales,// locales is Ref<string[]>orderBy: ArticleOrderBy.ViewedAt,order: Order.Desc,first: 5,},})
Reactive variable is allowed in both vue-apollo and vue-urql, it's working perfect without any issue. But after codegen, the variable type generated without Ref<T>, so it won't allow me to pass Ref<T> as a variable.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
It seem codegen variable generated couldn't support
Ref<T>
as a variable, and only allow me to pass whole variables asRef<Variable>
For example, in
typescript-vue-urql
Reactive variable is allowed in both
vue-apollo
andvue-urql
, it's working perfect without any issue. But after codegen, the variable type generated withoutRef<T>
, so it won't allow me to passRef<T>
as a variable.Any plugin I am missing to allow this support?
Beta Was this translation helpful? Give feedback.
All reactions