GraphQL Compose Codegen
GraphQL Compose Codegen is an open-source Drupal module that generates typed client code from a GraphQL Compose schema. It closes the loop between a Drupal GraphQL backend and a typed frontend, so consumers build against generated types instead of hand-written, drift-prone definitions.
What it does
Working from the schema GraphQL Compose exposes, the module produces ready-to-use TypeScript types and operations for the site's content model. When the backend schema changes, regenerating keeps the frontend's types in lockstep — eliminating an entire class of integration bugs in headless Drupal and JavaScript architectures.
Why it matters
In a headless build, the contract between Drupal and the frontend is the GraphQL schema. Hand-maintaining types against that contract is tedious and error-prone. Codegen makes the schema the single source of truth and the types a build artifact, so teams ship faster with end-to-end type safety.
Source & license
Published on Drupal.org: drupal.org/project/graphql_compose_codegen. Maintained by Wilkes & Liberty — opensource@wilkesliberty.com.