FormatSchemaDocument and FormatQueryDocument support to print comments
Closed this issue · 2 comments
sonatard commented
What happened?
FormatSchemaDocument and FormatQueryDocument doesn't print comments.
- input GraphQL file
type query {
# TODO: Fix
id: ID!
}
FormatSchemaDocument remove comments from GraphQL files.
type query {
id: ID!
}
What did you expect?
I would like to generate the following GraphQL output by parsing the given GraphQL file.
type query {
# TODO: Fix
id: ID!
}
Minimal graphql.schema and models to reproduce
- schema
type query {
# TODO: Fix
id: ID!
}
- query
query {
# TODO: Fix
id
}
versions
go list -m github.com/vektah/gqlparser/v2
? 2.5.4go version
? 1.20
refs
StevenACoffman commented
@Warashi are you interested in taking this on?