Skip to content

Validate command does not log files that have only deprecations #2883

Open
@HermanBilous

Description

@HermanBilous

Issue workflow progress

Progress of the issue based on the
Contributor Workflow

  • 1. The issue provides a reproduction available on GitHub, Stackblitz or CodeSandbox

    Make sure to fork this template and run pnpm generate in the terminal.

    Please make sure the Codegen and plugins version under package.json matches yours.

  • 2. A failing test has been provided
  • 3. A local solution has been provided
  • 4. A pull request is pending review

Describe the bug

  1. have a schema file e.g. schema.graphql
  2. have and operation file operation.graphql
  3. deprecate a field in schema and add it to a query in operation.graphql
  4. make sure that there are no errors in operation.graphql
  5. run graphql-inspector validate "operation.graphql" "schema.graphql"
  6. receive following output:
success All documents are valid
info 
Detected 1 document with deprecated fields:

To Reproduce Steps to reproduce the behavior:

Expected behavior
expected output:

success All documents are valid
info 
Detected 1 document with deprecated fields:

warn
in /Users/hermanbelous/Projects/vezha-public-frontend/o.graphql:


 - The field Post.field is deprecated. No longer supported

Environment:

  • OS: Osx
  • @graphql-inspector/5.0.8:
  • graphql:
  • NodeJS: 22

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions