We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@graphql-codegen/cli
Versions before v3.2.2 takes plugins written in TypeScript. However, we bumped a few dependencies in v3.2.2 that may have broken this feature.
Although, the examples in the doc are in .js and there's no mention of .ts support so I'm not sure if it was intentional
.js
.ts
yarn add -DE @graphql-codegen/cli@3.2.1
// codegen.ts import type { CodegenConfig } from "@graphql-codegen/cli"; const config: CodegenConfig = { schema: "**/schema.graphql", generates: { "src/test.generated.ts": { plugins: ["src/plugin.ts"], }, }, }; export default config; // src/plugin.ts export const plugin = () => { return "Hi from plugin!"; };
graphql-codegen
src/test.generated.ts
Hi from plugin!
yarn add -DE @graphql-codegen/cli@3.2.2
Unable to load template plugin matching 'src/plugin.ts'. Reason: Unexpected token 'export'
v3.2.2 and after should still take local TypeScript plugins.
No response
graphql
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Which packages are impacted by your issue?
@graphql-codegen/cli
Describe the bug
Versions before v3.2.2 takes plugins written in TypeScript. However, we bumped a few dependencies in v3.2.2 that may have broken this feature.
Although, the examples in the doc are in
.js
and there's no mention of.ts
support so I'm not sure if it was intentionalSteps to Reproduce the Bug or Issue
yarn add -DE @graphql-codegen/cli@3.2.1
graphql-codegen
createssrc/test.generated.ts
withHi from plugin!
as the content.yarn add -DE @graphql-codegen/cli@3.2.2
graphql-codegen
will show errors like this:Expected behavior
v3.2.2 and after should still take local TypeScript plugins.
Screenshots or Videos
No response
Platform
graphql
version: 16.8.0@graphql-codegen/cli
version(s): 3.2.2Codegen Config File
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: