graphql-inspector icon indicating copy to clipboard operation
graphql-inspector copied to clipboard

Coverage stats does not calculate queries, mutations and subscriptions.

Open osolomin90 opened this issue 9 months ago • 5 comments

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

Coverage calculates only root types of queries, mutations and subscriptions when should calculate fields of those root types. Screenshot 2024-04-26 at 18 19 00

To Reproduce Steps to reproduce the behavior:

Schema: Screenshot 2024-04-26 at 18 20 52

Root of issue: Screenshot 2024-04-26 at 18 16 31

Expected result: Each mutation inside Mutation type should be counted.

Environment:

  • OS:
  • @graphql-inspector/...: 4.0.3
  • graphql: 16.6.0
  • NodeJS: 18

Additional context

osolomin90 avatar Apr 26 '24 15:04 osolomin90

Hey @osolomin90, thank you for this issue! Any chance you want to try fix it?

TuvalSimha avatar May 02 '24 06:05 TuvalSimha

Hey @osolomin90, thank you for this issue! Any chance you want to try fix it?

@TuvalSimha I want, but I am not sure if I will have time to sit and solve it...

osolomin90 avatar May 10 '24 11:05 osolomin90

Hey @osolomin90, thank you for this issue! Any chance you want to try fix it?

@TuvalSimha Hey, I tried to fix it) https://github.com/kamilkisiela/graphql-inspector/pull/2731

osolomin90 avatar May 24 '24 08:05 osolomin90

Hey @osolomin90 thank you very much! i will take a look soon and update as well!

TuvalSimha avatar May 26 '24 07:05 TuvalSimha

@TuvalSimha, I was wondering which release will include stats changes?

DanteUkraine avatar May 30 '24 17:05 DanteUkraine