The problem is with Vitest + graphql. It is a known bug and a workaround was posted here:
https://github.com/vitest-dev/vitest/issues/4605
The workaround is to add this line to your vite config:
resolve: { alias: { graphql: "graphql/index.js" } },