Feature request: the Relay compiler should accept tagged literals of the form graphql(backtick ... backtick), not just graphql backtick ... backtick
Open
- Dominant language
- Rust
- Stars
- 19k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
* If Relay accepted template literals of the form
```
graphql(`...`)
```
then one could ingest the persisted queries json file and generate a file like [this one](https://github.com/isographlabs/isograph/blob/a28a4a47b846695b98f14d58cdde0c82e7c317a6/demos/pet-demo/src/components/__isograph/iso.ts), and give each graphql invocation the correct type (i.e. the type of the default export of the generated file) in TypeScript.
This requires changes to the babel plugin along the lines of [this](https://github.com/isographlabs/isograph/blob/main/libs/isograph-babel-plugin/compileTag.js#L20)
If y'all are down for this, I can make a PR real quick.
Contributor guide
Assessment
This issue has not been assessed yet.