Closed RicardoTrindade closed 4 years ago
@RicardoTrindade Yes sure if we can find a way for you to use this plugin, I'm all for it!
I'm accepting pull requests, but I'm not sure how we could support this kind of behaviour. I think of 2 possible solutions:
add
plugin to the generated file so we add custom code and provide all types without the namespace (but only for this generated file). But I'm not sure if that's possibletypesPrefix: 'Api.'
Ideally if we can find a combination without adding new options that would be great
Closing the issue since the PR is closed. Thanks for your help!
Have a question regarding the usage along with the
add
plugin https://graphql-code-generator.com/docs/plugins/addWe're using this plugin to have our types globally available, so our generated types file looks like this
When using the generated types we don't need to import them and call
Api.Payment
directly.Now when using it with the mock data generator the mocks are generated as follows
which is not working as the type should have the
Api.
prefix to compile successfully. Is this something you are considering to support or are accepting a PR any time soon ?