Skip to content

Releases: logaretm/villus

v1.2.0

30 May 07:55
Compare
Choose a tag to compare

πŸ†• New Features

  • Added skip option to useQuery which prevents executing queries if it is evaluated to true.
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 to useQuery.
const route = useRoute();

const { data, isFetching } = useQuery({
  variables: () => {
    return { id: route.params.id };
  },
});

v1.1.0

23 Apr 19:35
Compare
Choose a tag to compare

πŸ‘• TypeScript

πŸ†• New Features

  • feat: enable useQuery etc function outside of setup and outside component by @GavinXue in #156

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

06 Nov 01:13
Compare
Choose a tag to compare

βš™οΈ Misc

Updated graphql dependency to support v16 #144 (34313e3)

v1.0.0

18 Oct 00:21
Compare
Choose a tag to compare

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

26 Aug 11:53
Compare
Choose a tag to compare

πŸ› 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

07 Aug 20:01
Compare
Choose a tag to compare

πŸ¦– TypeScript

  • Changed the interface of ObserverLike to have optional callbacks to match other implementations in the wild closes #132 (2ecd80b)

v1.0.0-rc.19

25 Jul 01:01
Compare
Choose a tag to compare

πŸ†• New Features

The cache-and-network cache policy behavior has been changed to update the reactive data and error of the useQuery when the fresh data is fetched from the network, meaning now it will always reflect the fresh data available. #76 (23cd60b)

v1.0.0-rc.18

29 Jun 20:59
Compare
Choose a tag to compare

πŸ¦– TypeScript

  • Updated the return result of Client.executeQuery and Client.executeMutation to include the query type #128 (80426e2)

v1.0.0-rc.17

12 May 15:38
Compare
Choose a tag to compare

πŸ’€ Breaking changes

  • Dropped Vue 2 support, for now. to better focus on the full reactivity features of Vue 3

v1.0.0-rc.16

12 May 15:37
Compare
Choose a tag to compare

πŸ› Bug Fixes

  • normalize the multipart queries that caused the query to send ASTs #112 (#113) (c54fd0e)