You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
When comparing two identical schemas featuring a @deprecated field, graphql-inspector diff falsely detects the @deprecated directive as being an addition when it is unchanged.
This seems to be specifically when comparing a typeDef string to an HTTP endpoint.
There is no difference in output between these two commands: pnpm exec graphql-inspector introspect ./scripts/makeGraphQLSchema.ts --require ts-node/register pnpm exec graphql-inspector introspect https://my-prod-env/graphql
Confirming I think that this is an actual bug in the diff algo and not environmental
I also cannot reproduce if I diff using HTTP for both old and new. In this case I get no changes detected
Detected the following changes (1) between schemas:
✔ Directive deprecated was added to field Mutation.raiseAdditionalWorkRequestForEvent
success No breaking changes detected
We use GraphQL codegen to combine a bunch of *.graphql definitions into a single typeDef. We version control the generated typeDef though so I can say with confidence that it does contain the @deprecated field.
The text was updated successfully, but these errors were encountered:
Issue workflow progress
Progress of the issue based on the
Contributor Workflow
Describe the bug
When comparing two identical schemas featuring a
@deprecated
field, graphql-inspector diff falsely detects the@deprecated
directive as being an addition when it is unchanged.This seems to be specifically when comparing a typeDef string to an HTTP endpoint.
There is no difference in output between these two commands:
pnpm exec graphql-inspector introspect ./scripts/makeGraphQLSchema.ts --require ts-node/register
pnpm exec graphql-inspector introspect https://my-prod-env/graphql
Confirming I think that this is an actual bug in the diff algo and not environmental
I also cannot reproduce if I diff using HTTP for both old and new. In this case I get no changes detected
To Reproduce Steps to reproduce the behavior:
pnpm exec graphql-inspector diff https://my-prod-env/graphql ./scripts/makeGraphQLSchema.ts --require ts-node/register
Output:
Expected behavior
No difference in schema.
Environment:
@graphql-inspector/cli
: 5.0.8graphql
: 16.10.0 (and 16.8.1, I tried upgrading)Additional context
Contents of my script:
We use GraphQL codegen to combine a bunch of *.graphql definitions into a single typeDef. We version control the generated typeDef though so I can say with confidence that it does contain the @deprecated field.
The text was updated successfully, but these errors were encountered: