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

skipDocumentsValidation is missing in CodegenConfig #9913

Open
thomasverleye opened this issue Mar 29, 2024 · 0 comments
Open

skipDocumentsValidation is missing in CodegenConfig #9913

thomasverleye opened this issue Mar 29, 2024 · 0 comments

Comments

@thomasverleye
Copy link

thomasverleye commented Mar 29, 2024

Which packages are impacted by your issue?

@graphql-codegen/cli

Describe the bug

The docs clearly state that a skipDocumentsValidation attribute should be available in the config but this is not a part of the CodegenConfig type and when added this config setting is completely ignored.

Your Example Website or App

https://codesandbox.io/p/devbox/vibrant-lake-y7dmnw

Steps to Reproduce the Bug or Issue

  1. Go to any codegen.ts in your repo using codegen
  2. Try to add skipDocumentsValidation
  3. 💥

Expected behavior

The skipDocumentsValidation to work and ignore certain rules.

Screenshots or Videos

No response

Platform

  • OS: [e.g. macOS, Windows, Linux]
  • NodeJS: [e.g. 18.5.0]
  • graphql version: [e.g. 16.3.0]
  • @graphql-codegen/* version(s): [e.g. 2.6.2]

Codegen Config File

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

const config: CodegenConfig = {
  schema: "schema.graphql",
  documents: "document.graphql",
  skipDocumentsValidation: {
    ignoreRules: ["OverlappingFieldsCanBeMergedRule"],
  },
  generates: {
    "types.ts": { plugins: ["typescript", "typescript-operations"] },
  },
};

export default config;

Additional context

Being able to do this would fix a lot other issues like #2781

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