Utility library for parsing and stripping annotated metadata from GraphQL schema descriptions (v0.0.3). Allows extracting custom annotations like @db.length or @db.unique from type/field descriptions, returning structured objects. Supports multiple namespaces and JSON-like values. Lightweight, no runtime dependencies, ships TypeScript definitions. Created by Guillaume Chau (Akryum), maintainer of vue-apollo and GraphQL tools. Suitable for code generation or ORM mapping where directives are not available.
npm install graphql-annotationsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates parsing and stripping @db annotations from a description string.
Ensure string values are quoted: @db.foo: 'bar' or @db.foo: "bar"
For false, do not include the annotation.
N/A
Use import { parseAnnotations } from 'graphql-annotations'Quote string values: @db.foo: 'bar'
Run npm install graphql-annotations
No dependency data recorded yet.