Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix AstPrinter to print field descriptions #2808

Conversation

david-castaneda
Copy link
Contributor

@david-castaneda david-castaneda commented Apr 21, 2022

AstPrinter.printAst omits field descriptions when there are no arguments or the arguments have no descriptions.

To reproduce

AstPrinter.printAst(Parser().parseDocument("""type Query { "comment" a: String }"""))
AstPrinter.printAst(Parser().parseDocument("""type Query { "comment" a("comment2" s: String): String }"""))

@bbakerman bbakerman self-requested a review April 26, 2022 01:46
@bbakerman
Copy link
Member

Thanks for this PR fix. I am happy to accept it - but it seems that a test ios failing that might be an assertion on the comment . Can you please have a look

@david-castaneda
Copy link
Contributor Author

@bbakerman Thanks for having a look, i updated the failing test case.

Copy link
Member

@bbakerman bbakerman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this

}
'''
}

def "print empty description"() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems there is a test failing IntrospectionResultToSchemaTest > test starwars introspection result FAILED

Copy link
Member

@bbakerman bbakerman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this

@bbakerman bbakerman added this to the 19.0 milestone Apr 27, 2022
@bbakerman bbakerman merged commit 5e7d856 into graphql-java:master Apr 27, 2022
@dondonz dondonz modified the milestones: 19.0, 18.1 May 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants