Custom GraphQL template tag #8738
Labels
area:multiparser
Issues with printing one language inside another, like CSS-in-JS
lang:graphql
Issues affecting GraphQL
lang:javascript
Issues affecting JS
locked-due-to-inactivity
Please open a new issue and fill out the template instead of commenting.
type:enhancement
A potential new feature to be added, or an improvement to how we print something
This may be considered a dupe of #4260, because one of the solutions there would satisfy this issue too.
I work on a project called Nexus and we're considering integrating ts-graphql-plugin. It allows for static analysis of GraphQL strings, e.g. queries. One of its features is to allow customizing the template tag that it will analyze.
Relevant to Nexus because our desired API would not use
gql
as the tag name, but ratherctx.client.send
(at least currently).However, it appears that this path would lose us formatting from prettier.
So the feature request here is to allow local prettier configuration that would make it so a custom tag/path such as
ctx.client.send
could be treated as GraphQL source to format.A solution taken from #4260 that could work for this, adapted:
The text was updated successfully, but these errors were encountered: