highlight.js syntax definition for GraphQL, version 1.0.2. Provides syntax highlighting for GraphQL queries, mutations, and schemas within highlight.js. Works both in browsers and Node.js. No frequent updates; last release in 2017. Differentiator: adds GraphQL support to highlight.js, which doesn't include it natively.
npm install highlightjs-graphqlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to register the GraphQL language with highlight.js in Node.js or browser.
Use hljsDefineGraphQL(hljs) instead of passing it directly to hljs.registerLanguage.
Use a newer GraphQL grammar for highlight.js, such as highlightjs-graphql-updated, or adapt the code.
Install with npm install highlightjs-graphql.
Use const hljsDefineGraphQL = require('highlightjs-graphql'); (CommonJS) or import hljsDefineGraphQL from 'highlightjs-graphql' (ESM if supported)npm install highlight.js (the correct package)