# @graphitation/graphql-js-tag

> A simple graphql-js AST based `graphql` tagged template function.

Latest version **0.11.1** (published 2026-07-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install @graphitation/graphql-js-tag
pnpm add @graphitation/graphql-js-tag
yarn add @graphitation/graphql-js-tag
bun add @graphitation/graphql-js-tag
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.11.1 |
| Published | 2026-07-14 |
| First published | 2021-04-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 18.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 152 |
| Maintainers | alloy, kenotron_msft, gql-svc, freiksenet, kerrynf, microsoft-oss-releases, celia_account, pavelglac_microsoft, microsoft1es, vrazuvaevms |

## Links

- npm: https://www.npmjs.com/package/@graphitation/graphql-js-tag
- Repository: https://github.com/microsoft/graphitation
- Homepage: https://github.com/microsoft/graphitation#readme
- Issues: https://github.com/microsoft/graphitation/issues
- npm.io page: https://npm.io/package/@graphitation/graphql-js-tag

## Dependencies (1)

- [invariant](https://npm.io/package/invariant.md) ^2.0.0

## Recent versions

- 0.11.1 (latest) — 2026-07-14
- 0.11.2-canary.1 (canary) — 2026-06-22
- 0.9.1 (next) — 2023-09-21
- 0.7.0 (mjs-beta) — 2021-12-14
- 0.11.2-canary.0 — 2026-06-19
- 0.11.0 — 2026-02-06
- 0.10.0 — 2025-04-02
- 0.9.4 — 2024-10-23
- 0.9.3 — 2024-10-17
- 0.9.0 — 2022-03-02
- 0.8.3 — 2022-01-25
- 0.8.2 — 2022-01-14
- 0.8.1 — 2022-01-14
- 0.8.0 — 2021-12-23
- 0.6.0 — 2021-12-13
- … 9 more at https://npm.io/package/@graphitation/graphql-js-tag/versions

## README

# graphql-js-tag

A simple graphql-js AST based `graphql` tagged template function.

This version makes a few assumptions that allow it to make some optimizations:

- Documents will not be mutated once created, which allows copying interpolated documents by reference instead of value.
- Documents are named uniquely and defined only once, which makes de-duping by reference possible.

Other optimizations:

- The `invariant` call can be stripped out when applicable.
- Inline documents are parsed ahead-of-time and have their AST inlined.

---
_Source: https://npm.io/package/@graphitation/graphql-js-tag · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
