🆕 @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>