Skip to content

String-formatted schema descriptions will be ignored #253

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

Closed
hyunrealshadow opened this issue Mar 26, 2019 · 0 comments
Closed

String-formatted schema descriptions will be ignored #253

hyunrealshadow opened this issue Mar 26, 2019 · 0 comments
Labels
Milestone

Comments

@hyunrealshadow
Copy link

In this issue #169, I found that the description was ignored.

I am using graphql-java 11.0 and graphql-java-tools 5.5.1.

internal fun getDocumentation(node: AbstractNode<*>): String? = node.comments?.asSequence()
?.filter { !it.content.startsWith("#") }
?.joinToString("\n") { it.content.trimEnd() }
?.trimIndent()
}

The current description is obtained by this method.
But if you use String-formatted schema descriptions, It will be in definition.description.

private fun createObject(definition: ObjectTypeDefinition, interfaces: List<GraphQLInterfaceType>): GraphQLObjectType {
val name = definition.name
val builder = GraphQLObjectType.newObject()
.name(name)
.definition(definition)
.description(getDocumentation(definition))

So this issue has nothing to do with graphql-java.

@oliemansm oliemansm added the bug label Mar 30, 2019
@oliemansm oliemansm added this to the 5.4.2 milestone Mar 30, 2019
oliemansm added a commit that referenced this issue Apr 6, 2019
…-formatted-schema-descriptions

Use string formatted descriptions if available (fix #169, fix #253)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants