dotansimha/graphql-code-generator-community

[typescript-react-query] add documentMode support

オープン

#118 opened on 2021/03/12

 (2 件のコメント) (5 件のリアクション) (0 人の担当者)TypeScript (195 件のフォーク)github user discovery
help wanted

Repository metrics

Stars
 (136 個のスター)
PR merge metrics
 (平均マージ 1d 11h) (30d で 28 merged PRs)

説明

Is your feature request related to a problem? Please describe.

We want to preprocess the document to remove duplicated fragments. For this we created a custom version of graphql tag witch works fine. But now we want to use the react-query plugin and can not enable graphql-tags with it.

Currently typescript-react-query forces the document-mode to "string".

Describe the solution you'd like

typescript-react-query should be able to use the document-modes the other plugins support.

Describe alternatives you've considered

It would be possible to fix our problem by make grpahql-code-gen dedup the fragments before generating the document, but I have no idea yet how to do so. Another way would be to preprocess the document when its done.

コントリビューターガイド