Patrick Seafield
08/30/2022, 6:45 PMexamples/server/ktor/
repo and trying to generate a schema for my ktor server, but I'm getting this error:
Caused by: com.expediagroup.graphql.generator.exceptions.InvalidPackagesException: The configured packages do not contain any valid classes: "[com.ppseafield, com.ppseafield.graphql]"
The com.ppseafield.graphql
package contains a class UserService : Query {}
. How can I make sure the SchemaGenerator
sees my classes?Patrick Seafield
08/30/2022, 6:46 PMgraphql-kotlin-server
and graphql-kotlin-schema-generator
v6.2.2Dariusz Kuc
08/30/2022, 7:23 PMUserService
contains any functions?Patrick Seafield
08/30/2022, 7:26 PMclass UserQuery : Query {
@GraphQLDescription("Check if a username already exists.")
fun usernameExists(username: String): Boolean {
return false
}
fun motd(): String {
return "howdy, folks!"
}
}
Patrick Seafield
08/30/2022, 7:27 PMPatrick Seafield
08/30/2022, 7:28 PMDariusz Kuc
08/30/2022, 7:33 PMDariusz Kuc
08/30/2022, 7:33 PMPatrick Seafield
08/30/2022, 7:33 PMPatrick Seafield
08/30/2022, 7:35 PMPatrick Seafield
08/30/2022, 7:40 PMPatrick Seafield
08/30/2022, 7:51 PMbuild/schema.graphql
is being built correctly with the gradle pluginPatrick Seafield
08/30/2022, 8:03 PMdevelopment = true
from my configuration, I was able to run the server.Patrick Seafield
08/30/2022, 8:04 PMDariusz Kuc
08/30/2022, 8:04 PMDariusz Kuc
08/30/2022, 8:04 PMPatrick Seafield
08/30/2022, 8:04 PMDariusz Kuc
08/30/2022, 8:06 PM