github logaretm/villus v3.2.0

latest releases: v3.5.1, v3.5.0, v3.4.0...
15 months ago

🆕 @villus/batch

You can now add an exclusion filter as config for the batch plugin to force specific queries to be executed in a non-batched request.

<script setup>
import { useClient } from 'villus';
import { batch } from '@villus/batch';

useClient({
  url: 'https://test.com/graphql',
  // Exclude all queries named "Posts"
  use: [batch({ exclude: ({ query }) => /query Posts/.test(query) })],
});
</script>

🆕 New features

  • Exported normalizeQuery helper that converts a query (string, or a document object) to a string.
  • New onData and onError for the useMutation composable if you prefer to use callback style for handling, thanks to @jbaubree (#197)

Don't miss a new villus release

NewReleases is sending notifications on new releases.