Works with @graphql-codegen/add?
There is an example in the README for use with @graphql-codegen/add. https://github.com/piglovesyou/graphql-let#graphql-let-specific-options
But I couldn't get the generated codes including the section. Small reproduction codes & generated codes. https://gist.github.com/pokutuna/d3bb746eed98ba6073f21817afd7574c
Hey, I confirm this. I wanted to use @graphql-codegen/add of version 2.0.2, but the line is not added on top of the files.
BTW, as of version 2.0.0, the plugin configuration requires the content: part, so the README is outdated as well: https://github.com/dotansimha/graphql-code-generator/blob/master/packages/plugins/other/add/CHANGELOG.md#200
Is this planned to be fixed anytime soon?
Hit the same issue here, was trying to add DeepPartial to allow for partial results, but the import is never added to the output, and that causes errors like property 'Boolean' of exported interface has or is using private name 'DeepPartial'.
My config changes:
plugins:
- typescript-operations
- typescript-react-apollo
- add:
content: "import { DeepPartial } from 'utility-types';"
config:
defaultMapper: DeepPartial<{T}>