Describe the bug
Generation of typescript objects fails since the last update of [email protected].
To Reproduce
Steps to reproduce the behavior:
https://codesandbox.io/s/inspiring-pasteur-onywi
Expected behavior
In the codesandbox types.ts files at the line 36, we should have:
& Pick<User, '[object Object]' | '[object Object]' | '[object Object]'>
instead of:
& Pick<User, 'id' | 'user' | 'email'>
Environment:
@graphql-codegen/cli: 1.19.1@graphql-codegen/typescript: 1.17.11@graphql-codegen/typescript-operations: 1.17.9@graphql-codegen/typescript-resolvers: 1.17.11graphql: 14.7.0node --version in codesandbox => v10.21.0Additional context
Hi, @c100k , please update typescript-operations as well. It should be: 1.17.10.
Hi @dotansimha, thanks for the feedback. Tested on the codesandbox and indeed it fixed it.
Generally speaking, having two dependencies with two different version number makes the whole thing harder to follow.
That does not follow exactly semantic versioning.
I totally agree with you, but unfortunately, semantic versioning doesn't refer to siblings / optional deps.
The thing here is that typescript-operations and typescript works together, but it can also be standalone. And both shares a common package. Fixing something in the common package will require you to update both to latest (like in this case). We are trying to avoid these changes as much as possible.
We don't want to publish the entire monorepo on each change... we used to do it in the past but it was causing an overhead and published packages for no reason.
I will update the release notes, hope that helps.
Ah ok I understand. Indeed, publishing everything, everytime is also not a good thing.
Maybe peerDependencies can help in this kind of situation. This way it would probably show warnings when executing yarn install.
And btw, you're doing a very good job with this tool!
Most helpful comment
Ah ok I understand. Indeed, publishing everything, everytime is also not a good thing.
Maybe
peerDependenciescan help in this kind of situation. This way it would probably show warnings when executingyarn install.And btw, you're doing a very good job with this tool!