🏎 A tiny and fast GraphQL client for Vue.js
MIT License
Bot releases are hidden (Show)
This is not a breaking change as villus
is mainly aimed to be used with the composition API, so the implement workaround offers more utility by allowing using useClient
and useXXX
at the same component level.
useQuery
had to be changed to better differentiate between the TypedDocument type and the options accepted by useQuery
. Now, useQuery accepts a single argument containing all the options.This release contains a bunch of minor but breaking changes 💥
Some props and functions names got changed to better communicate their purpose and avoid any obscure terminology
lazy
prop on useQuery
and Query
has been renamed to fetchOnMount
to better communicate the purposepausing
terminology for useQuery
and Query
to better reflect their use, resume
is now watchVariables
and pause
is now unwatchVariables
, isPaused
is now isWatchingVariables
. A little verbose but clear cutpause
prop name to be paused
on both Query
and Subscription
componentssuspend
prop on Query
component to suspended
for consistency with other propshandleSubscriptions
rather than their own weird thing, which allows subscriptions to participate in the plugins pipeline (previously they didn't)context
and fetch
options in favor of custom plugins API
batch
fetcher in favor of @villus/batch
plugin
A large chunk of villus code has been re-written from scratch to use pipeline-like operation transformers (plugins) similar to what apollo client and urql are doing with much less jargon and complexity, they are just a simple middleware performing operations on GraphQL queries as they go out or after execution.
multipart
plugin ⬆️The multipart
plugin will enable support for graphql file upload, check the documentation and examples here
suspend
function on useQuery
, now you can suspend the useQuery
by using await
(abd71625187cd1e4880ae62bc746ba240aaa97a3)done
, fetching
, paused
to isDone
, isFetching
, and isPaused
on queries, subscriptions, and mutations components slot props and props returned from their composable counterparts to better reflect their type (ef0a414cd85102200b748af5f024c440456873df)Now villus
supports both Vue 2 and 3 using the awesome vue-demi project, releases will keep updating both until the Vue ecosystem is comfortable at 3.x
[email protected]
to the watch
APIuseClient
now returns the client instance.@microsoft/api-extractor
to bundle the typings .d.ts
rollup.