Skip to content

Commit

Permalink
update README.md: add ts-transform-graphql-tag. (#143)
Browse files Browse the repository at this point in the history
* update README.md: add `ts-transform-graphql-tag`.

* Update README.md
  • Loading branch information
firede authored and jnwng committed Feb 6, 2018
1 parent 204cd50 commit 70a27e5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ This package only has one feature - it caches previous parse results in a simple

GraphQL queries can be compiled at build time using [babel-plugin-graphql-tag](https://github.com/gajus/babel-plugin-graphql-tag). Pre-compiling queries decreases the script initialization time and reduces the bundle size by potentially removing the need for `graphql-tag` at runtime.

#### TypeScript
Try this custom transformer to pre-compile your GraphQL queries in TypeScript: [ts-transform-graphql-tag](https://github.com/firede/ts-transform-graphql-tag).

#### React Native, Next.js
Additionally, in certain situations, preprocessing queries via the webpack loader is not possible. [babel-plugin-inline-import-graphql-ast](https://www.npmjs.com/package/babel-plugin-inline-import-graphql-ast) will allow one to import graphql files directly into your JavaScript by preprocessing GraphQL queries into ASTs at compile-time.

Expand Down

0 comments on commit 70a27e5

Please sign in to comment.