graphql-let
graphql-let copied to clipboard
Can `graphql-let` be used with Vite?
I would be curious if it is possible to use the loader with Vite in any way? Otherwise, does anyone know of an equivalent library to generate typed document nodes for Vite? Thanks
In case anyone else finds this approach useful, I played with it and adapted the @vitejs/plugin-react to scan graphql files and apply the graphql-let loader to generate the types. It seems to do a good enough job so far, here you can find a small gist with what the config looks like: https://gist.github.com/alex-vladut/98db99556e1588449ae1457d68a7fb19
It is also available as an NPM package https://www.npmjs.com/package/@lente/vite-plugin-graphql