-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
coreRelated to codegen core/cliRelated to codegen core/clistage/4-pull-requestA pull request has been opened that aims to solve the issueA pull request has been opened that aims to solve the issue
Description
Describe the bug
$ yarn codegen
$ graphql-codegen --config ./codegen.ts
✔ Parse Configuration
⚠ Generate outputs
❯ Generate to types.ts
✔ Load GraphQL schemas
✔ Load GraphQL documents
✖ GraphQL Document Validation failed with 1 errors;
Error 0: Unknown fragment "CurrentUser".
at /sandbox/.graphql:9:8
error Command failed with exit code 1.Broken sandbox:
https://codesandbox.io/s/gql-codegen-fragment-error-reversion-narrow-dep-mtze4x?file=/package.json
"dependencies": {
"@graphql-codegen/cli": "2.13.10", // <---------
"@graphql-codegen/typescript": "2.8.1",
"@graphql-codegen/typescript-operations": "2.5.6",
"graphql": "^16.2.0"
}Working sandbox:
https://codesandbox.io/s/gql-codegen-fragment-error-reversion-working-9j9i6q?file=/package.json
"dependencies": {
"@graphql-codegen/cli": "2.13.9",
"@graphql-codegen/typescript": "2.8.1",
"@graphql-codegen/typescript-operations": "2.5.6",
"graphql": "^16.2.0"
},Your Example Website or App
https://codesandbox.io/s/gql-codegen-fragment-error-reversion-narrow-dep-mtze4x?file=/package.json
Steps to Reproduce the Bug or Issue
yarn generate
Expected behavior
I expect @graphql-codegen/cli >= 2.13.10 to work like previous versions.
Screenshots or Videos
No response
Platform
see codesandbox
Codegen Config File
default codesandbox file
Additional context
This has been working fine and I was surprised with a fresh ncu -u && yarn install with only patch releases updated that my codegen is broken. I've narrowed the test sandbox down to @graphql-codegen/[email protected] being successful, and @graphql-codegen/[email protected] failing.
Nickersoft, jkepps, danielbuechele, tobiasdiez, Rykuno and 11 morehjoelhMokumJ, n33pm, Rykuno, vcapretz and hjoelh
Metadata
Metadata
Assignees
Labels
coreRelated to codegen core/cliRelated to codegen core/clistage/4-pull-requestA pull request has been opened that aims to solve the issueA pull request has been opened that aims to solve the issue