Open KarineBrandelli opened 2 weeks ago
You are migrating to a new major version so according to SemVer it is expected to have breaking changes during this process. In other words, you cannot expect the same output when you migrate to a major version. In your case it is even more... There are 4 major releases in between v1 and v5. For sure, there would be bunch of changes in the output and also in the configuration.
I'd suggest you to check the migration guides and changelogs between each major version to see the breaking changes and the steps you should take. If a feature is missing or the alternative feature/configuration for the newer version doesn't work as expected, feel free to create an issue but I don't think we can't help you much further at this point.
@ardatan I've checked the changelogs and the migrations guide. Unfortunally, both of them are lacking information.
The changelogs are confusing and the migrations guides only support the migrations below:
So if you have any other suggestions, I'm happy to hear it 😃
codegen is really just about config. I would just start with a new config file by reading the latest docs. The defaults have changed a lot in various versions. So would need to see config per plugin
Which packages are impacted by your issue?
@graphql-codegen/cli
Describe the bug
I'm migrating from v1 to v5 of
@graphql-codegen/cli
. I'm using a react + webpack + typescript application, with graphql and apollo. Here's the versions:When migration from v1 to v5, the generated file does not 'obey' the rules as it was set on the v1.
Here's the v1 versions, config file and output:
Here's the v5 versions, config file and wrong output:
Your Example Website or App
don't have, is a company private repo
Steps to Reproduce the Bug or Issue
don't have, is a company private repo
Expected behavior
When updating to v5, I expect the enums keep the 'T' when used.
Screenshots or Videos
No response
Platform
graphql
version: [14.5.7]@graphql-codegen/*
version(s): [ before: "@graphql-codegen/cli": "1.7.0", "@graphql-codegen/fragment-matcher": "1.12.2", "@graphql-codegen/typescript": "1.7.0", "@graphql-codegen/typescript-operations": "1.7.0",after: "@graphql-codegen/cli": "5.0.2", "@graphql-codegen/fragment-matcher": "5.0.2", "@graphql-codegen/typescript": "4.0.9", "@graphql-codegen/typescript-operations": "4.2.3", ]
Codegen Config File
Additional context
No response