0no-co / gql.tada

🪄 Magical GraphQL query engine for TypeScript
https://gql-tada.0no.co
MIT License
2.45k stars 36 forks source link

gql.tada turbo doesn't generate cache for documents in Vue SFC files #231

Closed KammererTob closed 3 months ago

KammererTob commented 3 months ago

Describe the bug

It seems like gql.tada turbo does not work with Vue SFC files. Cache entries in my project are only generated for normal typescript files, but none for any documents defined in my components.

See the reproduction provided for a minimal example. The graphql-cache.d.ts file only contains the query of random.ts, although there is another query defined in PokemonList.vue.

Maybe i misunderstood something, but i assume that those should be generated as well?

Thank you!

Reproduction

https://github.com/KammererTob/gql.tada-turbo-bug/tree/main

gql.tada version

gql.tada v1.5.3

Validations

kitten commented 3 months ago

Duplicate of #210

I know that looking at the two exactly, they don't seem similar at first glance but the tl;dr is that Vue, Svelte, Astro, and similar files cause a lot of problems to the tools around them and specifically in TypeScript's case it doesn't have support built in.

This is still something we'll look at but we haven't figured out where it falls into our priorities yet after @JoviDeCroock did some initial investigation work and tried to build a proof of concept. This is further complicated by this having to be done for two or three separate APIs with separate implementations:

But in short, the other issue is essentially the same from an implementation perspective