pgutkowski / KGraphQL

Pure Kotlin GraphQL implementation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to Query for Description on Type

adavis opened this issue · comments

I have a very simple test class and I've added a description to it in the schema:

data class Player(val name: String = "", val age: Int = 0)

type<Player> {
    description = "A NBA Player on a Team"
}

But when I query for this description with the following:

query {
	__schema {
		types {
	        name
	        kind
	        description
	    }
	}
}

It's always empty. Is there something I need to do differently to be able to inspect the descriptions that I set in the schema?

Hi @adavis!

Thank you for your bug report. I'm sorry that it took so long for me to respond. It's weird, because I've added test in 11f7a55 and it passes. Besides, demo application has description field on many types eg PlayerApiConfigurator.kt has description producing this json.

Please provide more details (like some test case or detailed steps to reproduce) so we can solve your issue.

I totally don't know why it wasn't working. But I just ran another query on my current sample app and it worked. If I can reproduce the original problem, I'll create a new issue. 🤷🏽‍♀️