villus

🏎 A tiny and fast GraphQL client for Vue.js

MIT License

Downloads
2.5K
Stars
789
Committers
23

Bot releases are visible (Hide)

villus -

Published by logaretm almost 4 years ago

🆕 Enhancements

  • Implement a workaround for self-injections being disabled by vuejs/vue-next#2424 that causes #72

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.

villus -

Published by logaretm almost 4 years ago

💥 Breaking Changes

  • Due to the typing issues in #68 the signature of 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.
villus -

Published by logaretm about 4 years ago

👕 Types

  • Fixed fetchOnMount type not named correctly #57 (09c3de457e4a4b30742e5f315b1241b0961681fb)
villus -

Published by logaretm about 4 years ago

This release contains a bunch of minor but breaking changes 💥

Props Renamed

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 purpose
  • Changed the pausing 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 cut
  • renamed pause prop name to be paused on both Query and Subscription components
  • renamed suspend prop on Query component to suspended for consistency with other props

Subscription Changes

  • subscriptions have been re-implemented as a simple plugin handleSubscriptions rather than their own weird thing, which allows subscriptions to participate in the plugins pipeline (previously they didn't)
villus -

Published by logaretm about 4 years ago

👕 TypeScript

Export the Client Type so it can be used around (#54) thanks to @ppseafield

villus -

Published by logaretm about 4 years ago

Bug Fixes 🐛

  • Check for the kind property instead of loc for determining the query type #52 (#53) Thanks to @pipe01
villus -

Published by logaretm about 4 years ago

Breaking Changes 💀

  • deprecate the context and fetch options in favor of custom plugins API
  • deprecate the exported batch fetcher in favor of @villus/batch plugin
  • changed the signature of provider and useClient (b4fa6d9) due to conflicts with TypeScript typings

Bug Fixes 🐛

  • handle non-200 error responses closes #49 (0950fa8)

New Features

Plugins API 🔌

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.

Check the documentation here

multipart plugin ⬆️

The multipart plugin will enable support for graphql file upload, check the documentation and examples here

villus -

Published by logaretm about 4 years ago

Nothing Changed in this release

villus -

Published by logaretm about 4 years ago

🐛 Bugs

  • fix: useQuery not using the safe stringify function introduced in last release (64b801c18906243731a843c0191a20ac9bf7a9f6)
villus -

Published by logaretm about 4 years ago

  • DX: added a fallback to json-fast-stable-stringify dependency in case villus was being used in browser via CDN (328f8b867c40a306fad46002bb81b5f68f390199)
villus -

Published by logaretm about 4 years ago

💀 Breaking Changes

  • use a thenable object instead of suspend function on useQuery, now you can suspend the useQuery by using await (abd71625187cd1e4880ae62bc746ba240aaa97a3)
  • renamed 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)
villus -

Published by logaretm about 4 years ago

🐛 Bugs

  • fix: correctly use vue-demi for a util function that broke Vue 2 compatibility (ee06e647003643488f978a4e1dd876f94f712221)
villus -

Published by logaretm about 4 years ago

👕 Types

  • fix useQuery not typing data value correctly (b509e6a81c472b8e6ac3f22cea5e2aa35987cee8)
villus -

Published by logaretm about 4 years ago

👕 Types

  • fixed useQuery not typing variables correctly (b53e7f21ee0f33bbdcd9ab75a6e28dfffca1c201)
villus -

Published by logaretm about 4 years ago

👕 Types

  • Make useMutation variables optional (534c460fd6b95a60b0b2441d35d4fb8e250e9a30)

🆕 Features

  • added simple overloads for useQuery and useMutations (fbcd4ce44ab0b4eb25b85e5a57caa20d39bc5c96)
villus -

Published by logaretm about 4 years ago

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

🐛

  • fix: prefer function slots for better performance (#42) thanks to @onx2
villus -

Published by logaretm about 4 years ago

✨ New Features

Added withProvider helper to the Vue 3 release line

villus -

Published by logaretm over 4 years ago

fixed: Query batching producing incorrect results #26

villus -

Published by logaretm over 4 years ago

fixed: Query batching producing incorrect results #26

villus -

Published by logaretm over 4 years ago

  • Updated usage to accommodate breaking changes in [email protected] to the watch API
  • useClient now returns the client instance.
  • Use @microsoft/api-extractor to bundle the typings .d.ts rollup.