Skip to content

The script is generating the types for all the Query and not only the ones in my documents #7884

@gpessa

Description

@gpessa

Describe the bug

The script generate all the types, also the one not included in the specified documents.

To Reproduce
Run graphql-codegen --config codegen.js

My codegen.yml config file:

module.exports = {
  schema: {
    ['...']: {
      headers: {
        'content-type': 'application/json'
      }
    }
  },
  documents: ['./src/**/*.tsx', './src/**/*.ts'],
  overwrite: true,
  generates: {
    './api/index.ts': {
      plugins: ['typescript', 'typescript-operations'],
      config: {
        skipTypename: true,
        withHooks: true,
        withHOC: false,
        withComponent: false
      }
    }
  }
};

Expected behavior

Only the queries in my documents should be generated

Metadata

Metadata

Assignees

No one assigned

    Labels

    coreRelated to codegen core/cli

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions