Conversion library between core-types and GraphQL (code/AST). Current stable version 3.0.0, pure ESM, requires Node >=14.13.1 || >=16.0.0. Part of the typeconv ecosystem alongside core-types-ts and core-types-json-schema. Typically used indirectly via typeconv. Provides bidirectional conversion, custom name generation for inline types, and warning/error handling for unsupported GraphQL features.
npm install core-types-graphqlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Converts a core-types document with object and union types to GraphQL schema string, showing auto-generated name for inline types.
Use dynamic import() or switch your project to ESM (e.g., type:module in package.json).
Provide a custom nameGenerator function that produces meaningful names based on context.
Set unsupported to 'error' during development to catch unsupported types early.
Validate your core-types names against GraphQL naming rules before conversion.
Change to dynamic import: const { convertCoreTypesToGraphql } = await import('core-types-graphql'); or use ESM throughout.Use import { convertCoreTypesToGraphql } from 'core-types-graphql' (curly braces).Sanitize property names before conversion or use a nameGenerator that replaces invalid characters.