# highlightjs-graphql

> Highlight.js syntax definition for GraphQL

Latest version **1.0.2** (published 2020-09-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install highlightjs-graphql
pnpm add highlightjs-graphql
yarn add highlightjs-graphql
bun add highlightjs-graphql
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2020-09-18 |
| First published | 2019-06-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | dpeek |
| Maintainers | dpeek |
| Keywords | GraphQL, highlight.js, highlightjs, syntax |

## Links

- npm: https://www.npmjs.com/package/highlightjs-graphql
- Repository: https://github.com/dpeek/highlightjs-graphql
- Homepage: https://github.com/dpeek/highlightjs-graphql#readme
- Issues: https://github.com/dpeek/highlightjs-graphql/issues
- npm.io page: https://npm.io/package/highlightjs-graphql

## Alternatives

- [@oh-my-pi/pi-natives](https://npm.io/package/@oh-my-pi/pi-natives.md) — 51.8K weekly downloads
- [@capgo/capacitor-light-sensor](https://npm.io/package/@capgo/capacitor-light-sensor.md) — 3.0K weekly downloads
- [@heyhuynhgiabuu/pi-diff](https://npm.io/package/@heyhuynhgiabuu/pi-diff.md) — 492 weekly downloads
- [@lotsa/verdant-lang-asm](https://npm.io/package/@lotsa/verdant-lang-asm.md) — 38 weekly downloads
- [new-era-syntax](https://npm.io/package/new-era-syntax.md) — 20 weekly downloads

## Recent versions

- 1.0.2 (latest) — 2020-09-18
- 1.0.1 — 2019-06-18
- 1.0.0 — 2019-06-18

## README

`highlight.js` syntax definition for GraphQL.

For more about highlight.js, see https://highlightjs.org/

For more about GraphQL, see https://graphql.org/

### Usage

Simply include the `highlight.js` script package in your webpage or node app, load up this module and apply it to `hljs`.

If you're not using a build system and just want to embed this in your webpage:

```html
<script type="text/javascript" src="/path/to/highlight.pack.js"></script>
<script
  type="text/javascript"
  src="/path/to/highlightjs-graphql/graphql.js"
></script>
<script type="text/javascript">
  hljs.registerLanguage("graphql", window.hljsDefineGraphQL);
  hljs.initHighlightingOnLoad();
</script>
```

If you're using webpack / rollup / browserify / node:

```javascript
var hljs = require("highlightjs");
var hljsDefineGraphQL = require("highlightjs-graphql");

hljsDefineGraphQL(hljs);
hljs.initHighlightingOnLoad();
```

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