Missing override
https://github.com/dotansimha/graphql-code-generator/blob/aeaea1ed1d09172a3bf8a9bd4f1d3cd7ab65023b/packages/plugins/typescript/apollo-angular/src/visitor.ts#L302
Should be fixed to prevent error TS4114: This member must have an 'override' modifier because it overrides a member in the base class
Yes, I'm having the same issue where document needs 'override document'
This was fixed with release @graphql-codegen/[email protected]
Add addExplicitOverride: true to your config.
See https://www.graphql-code-generator.com/plugins/typescript-apollo-angular.
@TomONeill Thank you for your answer. This works.
Hi,
Thanks to your answer but it does not sound to work with the client property if overridden namedClient.
Do you have an alternative for this one?
Thanks in advance.
I added an issue for this (#7548) and a PR (#7553), but so far it hasn't been approved yet.
Amazing! Thanks a lot. Will disable the check in the tsconfig for now 😊
PR was merged! I think you can close the issue now.
I still have this issue with "@graphql-codegen/typescript-apollo-angular": "^3.4.12" installed :(
If all else fails, you should be able to set the "noImplicitOverride" compiler option to false in your tsconfig.json file. Depending on how you generated your application, this may have been set to true for you by default.
"@graphql-codegen/typescript-apollo-angular": "^3.5.5" Problem still there.
Ran into this "issue" too (with version 3.5.5) but as stated before, all I had to do was to set the addExplicitOverride config flag to true as stated in the documentation.
codegen.ts
import type { CodegenConfig } from '@graphql-codegen/cli';
const config: CodegenConfig = {
// ...
generates: {
'path/to/file': {
plugins: ['apollo-angular'],
config: {
addExplicitOverride: true
},
},
},
};
export default config;
The issue should be closed.