Skip to content

The types of pluckConfig is incorrect  #8579

@rwu823

Description

@rwu823

Describe the bug

The current types definition of config is as follows left side:

image

This is incorrect and differs from the document.
image

Your Example Website or App

none

Steps to Reproduce the Bug or Issue

  1. create a codegen.ts config.
  2. import the CodegenConfig types from @graphql-codegen/cli
  3. check the pluckConfig types

Expected behavior

should get correct types of pluckConfig

Screenshots or Videos

No response

Platform

  • "@graphql-codegen/cli": "2.13.11"

Codegen Config File

import { CodegenConfig } from '@graphql-codegen/cli';

const config: CodegenConfig = {
  pluckConfig: {
    magicComment: 'GraphQL',
//       ^? incorrect type, should be `gqlMagicComment`
    globalIdentifier: 'gql',
//       ^? incorrect type, should be `globalGqlIdentifierName`
  },
}

Additional context

If you are all good, I can create a PR for fixing this.

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