Skip to content

v3.2.0

Compare
Choose a tag to compare
@logaretm logaretm released this 20 Aug 15:13
· 27 commits to main since this release

πŸ†• @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)