I'm constructing a schema.graphql file with the AST plugin and also want to add a comment to the top. This is from my codegen.yml:
generates:
schema.graphql:
schema:
- schema-source.ts
plugins:
- schema-ast
- add:
content: '# Generated - DO NOT EDIT'
Besides prepending the content, it also appends an empty line which feels like a bug to me:

Are you using the v2 of the add plugin? or v1?
It's v2, according to my yarn.lock.
Thanks @borekb ! I think I managed to reproduce it and fix it. Pushed to a PR with some other minor bugs: https://github.com/dotansimha/graphql-code-generator/pull/4554
Fixed in @graphql-codegen/[email protected]