GraphQL Codegen plugin that generates Amplience JSON content type schemas from GraphQL schemas using the @amplienceContentType directive. Current stable version 1.2.0, supports Node >=18. This plugin transforms GraphQL types annotated with @amplienceContentType into JSON schema files for Amplience CMS. Unlike generic codegen plugins, it supports Amplience-specific directives like @amplienceText, @amplienceNumber, @amplienceLink, @amplienceReference, and scalars AmplienceImage/AmplienceVideo. It integrates with GraphQL Codegen presets and is typically used in CI/CD pipelines to generate Terraform-ready content type definitions.
npm install amplience-graphql-codegen-jsonNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows codegen configuration and a sample GraphQL schema with Amplience directives, generates JSON schemas for content types.
Use dynamic import() or switch to ESM. Ensure Node >=18.
Upgrade Node.js to version 18 or higher.
Use @amplienceConst(item: 'value') for String fields; use @amplienceConst(items: ['a','b']) for [String] fields.
Ensure every custom type referenced via @amplienceLink or @amplienceReference also carries @amplienceContentType.
npm install --save-dev amplience-graphql-codegen-json amplience-graphql-codegen-common
Switch to ES modules (import instead of require) or update Node >=18.