https://kotlinlang.org logo
Title
m

Marco Pierucci

06/18/2022, 10:22 PM
Hello hello! Im trying to build a super simple ktor based graphql server to run some android UI tests ( replacing kgraphql) Im following this simpel example https://github.com/ExpediaGroup/graphql-kotlin/tree/master/examples/server/ktor-server/src/main/kotlin/com/expediagroup/graphql/examples/server/ktor But I keep getting InvalidPackages exception ” The configured packages do not contain any valid classes..” Ive triple checked the package name. Is there anyhting super obvious that Im missing? Cheers!
d

Dariusz Kuc

06/18/2022, 11:20 PM
👋 can you share a link to a github repo?
m

Marco Pierucci

06/18/2022, 11:43 PM
Heyo! Sorry am working directly on my company repo. Will see to create a small github repo to repo and share it
👍 1
Right I have a repo now. Its not pollished by any means but serves he purpose
Just running the app will throw the aftermentioned excepion when initializing the server
d

Dariusz Kuc

06/21/2022, 10:58 PM
👋 so your issue is actually caused by attempting to run the graphql server from android
android does not use classfiles at runtime so when you attempt to start the server classgraph won't find any classes to load (see: https://github.com/classgraph/classgraph/discussions/567)
m

Marco Pierucci

06/21/2022, 11:13 PM
Oh wow thats a shame 😞 but thanks for the response! At least it makes sense now, much appreciated!
d

Dariusz Kuc

06/21/2022, 11:13 PM
Not super familiar with android so maybe there is a way
m

Marco Pierucci

06/21/2022, 11:16 PM
Out of curiosity, is the scann needed for a simple use case like the one in my example? ( So that it could maybe be disabled via opt in )
I guess its needed, okey nvm this was useful
d

Dariusz Kuc

06/21/2022, 11:17 PM
I linked to the similar issue from graalvm -> we use it for polymorphism and fed2
Guess in the simplest cases it might not be needed but it is part of core functionality
m

Marco Pierucci

06/21/2022, 11:18 PM
Yeah fair enough