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

audit command doesn't work with ci package #2696

Open
4 tasks
shawnjones253 opened this issue Mar 15, 2024 · 0 comments
Open
4 tasks

audit command doesn't work with ci package #2696

shawnjones253 opened this issue Mar 15, 2024 · 0 comments

Comments

@shawnjones253
Copy link

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

Following directions here, I'm trying to get graphql-inspector audit to work using just the CI package. When using @graphql-inspector/cli the command works, but when using @graphql-inspector/ci, @graphql-inspector/audit-command, and @graphql-inspector/code-loader, it produces no output.

To Reproduce Steps to reproduce the behavior:
package.json

"
scripts": {
  "gql-audit": "graphql-inspector audit './src/**/!(*.test).(ts|tsx)'"
},
"dependencies": {
    "@graphql-inspector/audit-command": "^4.0.3",
    "@graphql-inspector/ci": "^4.0.3",
    "@graphql-inspector/code-loader": "^4.0.2",
    "@graphql-inspector/commands": "^4.0.3",
    "@graphql-inspector/graphql-loader": "^4.0.2",
    "@graphql-inspector/loaders": "^4.0.3",
    "graphql": "^16.8.1"
  }

someFile.tsx

import { gql } from '@apollo/client'

gql`
  query MyQuery {
    myField
  }

No output

yarn gql-audit
$ graphql-inspector audit './src/**/!(*.test).(ts|tsx)'
✨  Done in 0.38s.

I even tried installing all the command packages and loader packages, no dice.

Finally, if I install @graphql-inspector/cli, everything works as expected.

Expected behavior
Audit output

Environment:

  • OS: mac 14.2
  • @graphql-inspector/...: versions above in package.json example
  • graphql: in package.json example
  • NodeJS: 20.4

Additional context

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