graphql-tools
graphql-tools copied to clipboard
Support .astro file loading on graphql-tag-pluck
Is your feature request related to a problem? Please describe.
Currently, graphql-tag-pluck (and packages depending on it) doesn't support loading documents from .astro files.
Describe the solution you'd like
Add .astro support on graphql-tag-pluck
Describe alternatives you've considered
Let Astro users define documents in .ts files and import them, which is inconvenient.
Additional context
~~The problem I found while implementing the fix is that the @astrojs/compiler doesn't provide any synchronous interfaces to transform the file (since it runs with WASM.) Is it okay to implement the feature async only?~~
Just found that the Astro compiler provides a synchronous version.