Open pierre-lucas40 opened 3 years ago
I felt onto the same problem and looked up importOperationTypesFrom in the codebase. It seems typescript-graphql-request did not even use it. But I see usage in vue-apollo, react-apollo, react-query
@lanwin is right. Not all plugins support all flags and all combinations with presets. We are trying to track those and fix, so we might found another one :) I guess in this case, it's an issue only with typescript-graphql-request plugin, right?
I guess in this case, it's an issue only with typescript-graphql-request plugin, right?
I dont use Preset but I would bet its the same issue. So 👍
Any updates on this?
Still needing this behavior!!!! Any updates?
Describe the bug I have a monorepo with a root codegen.yml including this:
In packages/api/src/types/models.ts, the operation's types are well imported from './common' (Types.InterfaceX) But in packages/api/src/types/auth-models.ts, the operation's types are not prefixed by 'Types.' so it doesn't find them... Why is there a difference between those 2 files please ? (If I only put the typescript's pluggin in the common file and let the typescript-operations in the specifics files, the types are well imported from common in both files...)
To Reproduce Steps to reproduce the behavior:
Generate types with 'typescript' and 'typescript-operations' pluggins in one file. Generate types with 'typescript-graphql-request' pluggin using "preset: import-types" and "presetConfig: typesPath: './path/to/common/file'"
Expected behavior To have my 'typescript-operations' types imported from my common file in both specific files ('Types.CommonType' instead of 'CommonType').
Environment:
Additional information I also tried to add config 'importOperationTypesFrom' for @graphql-codegen/typescript-graphql-request but that didn't generate anything different...
Thank you very much !