Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apollo client:codegen --mergeInFieldsFromFragmentSpreads option does nothing #2444

Open
FritsvanCampen opened this issue Sep 16, 2021 · 2 comments

Comments

@FritsvanCampen
Copy link

mergeInFieldsFromFragmentSpreads is on by default. The command line option allows you to only turn it on. There is no way turn it off.

mergeInFieldsFromFragmentSpreads is implemented as an oclif boolean flag so alternatives like apollo client:codegen --mergeInFieldsFromFragmentSpreads=false don't work.

There is an older issue: #537 where the meaning of the flag was inverted but this was not done everywhere.

Potentially the fix is as simple as changing this line: https://github.com/apollographql/apollo-tooling/blob/master/packages/apollo/src/commands/client/codegen.ts#L235
From flags.mergeInFieldsFromFragmentSpreads to !!flags.mergeInFieldsFromFragmentSpreads

It might also be necessary to update the docs.

@kirillmarkelov
Copy link

kirillmarkelov commented Apr 15, 2022

The issue still exists

@Kienan6
Copy link

Kienan6 commented May 19, 2022

Any update on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants