Releases: logaretm/villus
v1.2.0
π New Features
- Added
skip
option touseQuery
which prevents executing queries if it is evaluated totrue
.
const route = useRoute();
// skip fetching if route param `id` does not exist
const shouldSkip = computed(() => {
return !route.params.id
});
const { data, isFetching } = useQuery({
// pass as ref ...
skip: shouldSkip,
});
// pass as a function, which rescives the current variables as an argument
const { data, isFetching } = useQuery({
// ...,
skip: (variables) => {
return !variables.id;
},
});
useQuery
variables
option can now be a function that returns a variables object. This is mainly a DX improvement to avoid having to create computed properties to pass touseQuery
.
const route = useRoute();
const { data, isFetching } = useQuery({
variables: () => {
return { id: route.params.id };
},
});
v1.1.0
π TypeScript
π New Features
This change will allow you to use useQuery
and friends in a limited fashion outside the setup function. This should reduce the occurrences where a client instance cannot be found due to the inject/provide
API caveats.
v1.0.1
v1.0.0
Villus has been stable for quite some time now aided by its goal to be a minimal GraphQL client for Vue.js and I think after all this time it is safe to say that the API is very stable and happy to go to v1.0 with this which would help anyone who is on the fence of adopting a beta or RC releases.
There is some stuff being experimented with and plans for improving villus, check the PRs and issues for those.
These are changes for this release:
π
Added paused
option for useSubscription
to start a subscription in lazy mode #142 (#143)
π¦ TypeScript
Added volar slot typing support for Query
, Mutation
and Subscription
components (1aec7e7)
v1.0.0-rc.21
π Bug Fixes
batch
handled failure when attempting to unbatch a non-JSON or empty responses, it should provide a new custom error instead. This is observed when servers running nginx return 502 randomly.
v1.0.0-rc.20
v1.0.0-rc.19
v1.0.0-rc.18
v1.0.0-rc.17
π Breaking changes
- Dropped Vue 2 support, for now. to better focus on the full reactivity features of Vue 3