Skip to content
New issue

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

add plugin ignores index.ts when using client present #10210

Open
simPod opened this issue Dec 5, 2024 · 0 comments
Open

add plugin ignores index.ts when using client present #10210

simPod opened this issue Dec 5, 2024 · 0 comments

Comments

@simPod
Copy link
Contributor

simPod commented Dec 5, 2024

Which packages are impacted by your issue?

@graphql-codegen/add

Describe the bug

add plugin should add eslint-disable to generated files

{ [`add`]: { content: `/* eslint-disable */` } },

it does so except for index.ts

All files except index.ts has /* eslint-disable */ added to them

image

Your Example Website or App

See bellow

Steps to Reproduce the Bug or Issue

  • Run generate with config specified bellow
  • open generated index.ts

Expected behavior

/* eslint-disable */
export * from "./fragment-masking";
export * from "./gql";

Screenshots or Videos

No response

Platform

  • OS: macos

  • NodeJS: 22

  • graphql version: 16.3

    "@graphql-codegen/add": "^5.0.3",
    "@graphql-codegen/cli": "^5.0.3",
    "@graphql-codegen/client-preset": "^4.5.1",
    "@graphql-codegen/fragment-matcher": "^5.0.2",
    "@graphql-codegen/typescript": "^4.1.2",
    "@graphql-codegen/typescript-document-nodes": "^4.0.12",
    "@graphql-codegen/typescript-operations": "^4.4.0",
    "@graphql-codegen/typescript-react-apollo": "^4.3.2",

Codegen Config File

const config: CodegenConfig = {
  documents: 'src/**/*.graphql',
  generates: {
    './src/gql/': {
      preset: 'client',
    },
  },
  overwrite: true,
  schema: '../schema.graphqls',
  watch: false,
};

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant