You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One thing I'm confused about - calling printer.Print doesn't seem to emit the descriptions in the standard triple-quoted style, though the parser seems to have tests to ensure it can detect them ... am I just missing something, or would the printer need to be extended to support this?
I would be happy to look at it if it's currently unsupported or not planned, though I'm not quite familiar with the visitor pattern and a nudge in the right direction would probably save me a lot of time.
My guess would be:
Each member function of the printDocASTReducer that can have a description prefix may need to try to read that value, and then fields that do have a description need to have that value be indented + newline'd (to support multiline comments) correctly in the output string
Some places like ast.FieldDefinition.InputValueDefinition the may have to conditionally newline when they are currently always inline, to support something like the following
"""cool type"""typeCool {
"""every cool bean"""beans: [ID]
""" check if a cool bean is present the resolver for this is super optimized """hasBean(
"""the id of the cool bean"""id: ID = "abc123"
): Boolean
}
Cheers!
The text was updated successfully, but these errors were encountered:
Hello,
First of all, thank you to everyone involved in writing this package! I have used it extensively and started publishing some helpers at https://github.com/Fanatics/graphql-ast-helpers
One thing I'm confused about - calling
printer.Print
doesn't seem to emit the descriptions in the standard triple-quoted style, though theparser
seems to have tests to ensure it can detect them ... am I just missing something, or would the printer need to be extended to support this?I would be happy to look at it if it's currently unsupported or not planned, though I'm not quite familiar with the visitor pattern and a nudge in the right direction would probably save me a lot of time.
My guess would be:
printDocASTReducer
that can have a description prefix may need to try to read that value, and then fields that do have a description need to have that value be indented + newline'd (to support multiline comments) correctly in the output stringast.FieldDefinition.InputValueDefinition
the may have to conditionally newline when they are currently always inline, to support something like the followingCheers!
The text was updated successfully, but these errors were encountered: