Skip to content

String-formatted schema descriptions will be ignored #253

Closed
@hyunrealshadow

Description

@hyunrealshadow

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions