Registry / devops / projen-graphql

projen-graphql

JSON →
library0.0.46jsnpmunverified

Helpers for Projen GraphQL projects, providing constructs to simplify GraphQL project setup within the Projen framework. Current version 0.0.46 is released irregularly without a fixed cadence. It integrates with constructs v10.3.0 and projen v0.88.0. Differentiators include Typescript support and a focused scope on GraphQL configuration. Compared to alternatives like graphql-codegen or generic Projen constructs, it offers opinionated defaults for Projen-based projects but has a narrow compatibility range and low adoption.

npm install projen-graphql
INSTALL
IMPORT
SIG · PROJEN-GRAPHQL
P
projen-graphql
devopsjavascriptv0.0.46
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

WhateverConstruct
import { WhateverConstruct } from 'projen-graphql'
import WhateverConstruct from 'projen-graphql'
This is a named export, not a default export.
ProjectType
import { ProjectType } from 'projen-graphql'
const { ProjectType } = require('projen-graphql')
ESM only; require() is not supported.
GraphqlProjectOptions
import type { GraphqlProjectOptions } from 'projen-graphql'
import { GraphqlProjectOptions } from 'projen-graphql'
Use type import for TypeScript to avoid runtime overhead.

Shows how to import the main construct and use it within a Projen project.

import { Project } from 'projen'; import { WhateverConstruct } from 'projen-graphql'; const project = new Project({ name: 'my-graphql-project', }); new WhateverConstruct(project, { // options here }); project.synth();
Debug
Known issues
breakingLibrary is incompatible with projen versions outside of 0.88.0 and constructs outside 10.3.0.
fix
Pin projen to 0.88.0 and constructs to 10.3.0.
affects: 0.0.46
deprecatedThe package has not been updated since 2023 and is tied to specific versions of projen and constructs.
fix
Consider forking or using generic Projen constructs, as upstream updates may break.
affects: >=0.0.0
gotchaAll exports are named; there is no default export.
fix
Use named imports such as import { WhateverConstruct } from 'projen-graphql'.
affects: >=0.0.0
breakingThe package is ESM-only and does not support CommonJS require().
fix
Use import syntax and ensure your project is configured for ESM.
affects: >=0.0.0
gotchaEngine requirement is locked to node >=20.10.0 <=20.10.0, which is extremely restrictive.
fix
Use a compatible Node.js version exactly 20.10.0 or modify the package.json locally.
affects: 0.0.46
Errors
Common errors & fixes
Cannot find module 'projen-graphql'
Package not installed or projen version mismatch prevents resolution.
fix
Ensure projen-graphql and its peer dependencies are installed: npm install projen-graphql projen@0.88.0 constructs@10.3.0
TypeError: Class constructor WhateverConstruct cannot be invoked without 'new'
Using CommonJS require() instead of ESM import, but package is ESM.
fix
Use import { WhateverConstruct } from 'projen-graphql' instead of require().
Error: [projen] Unsupported projen version. Expected ^0.88.0, got 0.x.xx
projen version outside of the peer dependency range.
fix
Match projen version exactly 0.88.0 as required by the peer dependency.
Upgrade
Version history
0.0.46latest on npm
Audit
Dependencies
constructsrequiredPeer dependency required for Projen construct integration.
projenrequiredPeer dependency required for Projen project configuration.
Agent activity
13 hits · last 30 days
node
12
Amazon
1
Resources
projen-graphql — npm install projen-graphql · libregistry