I keep getting the following error when adding `im...
# http4k
a
I keep getting the following error when adding
implementation group: "org.http4k", name: "http4k-graphql", version: "3.278.0"
to my
build.gradle
file. Any ideas?
Copy code
Could not find org.http4k:http4k-format-jackson:3.278.0.
d
we need to sync it to maven - can you add jcenter in the meantime?
a
Yeah, that works
d
the maven central syncing is really flakey -- not us but sontatype... 🙄
a
Somewhat related: https://www.http4k.org/guide/modules/graphql/ references something from
com.expediagroup
What version are you actually using in the example? Do you know? I couldn’t find any references to the version that is used in the example repo
d
aha - sorry
we use the expedia kotlin lib
i'll update it, but check out the example: https://github.com/http4k/examples/tree/master/graphql
a
Yes, but which version? 😛
Ah yes ok. Found it now.
Just fyi, version 4.0.0 breaks your example.
d
ah - thanks for letting us know. will check it out
a
Nw
Last question: Getting the following for this line of code from your example
Copy code
val gql: GraphQLHandler = JavaHttpClient().asGraphQLHandler(Uri.of("<http://localhost:8000/graphql>"))
Copy code
Cannot access class 'java.net.http.HttpClient'. Check your module classpath for missing or conflicting dependencies
Is there a conflicting import somewhere maybe? Or a conflict in dependencies?
d
are you on Java 8? if so, use Java8HttpClient
also - how does it break the example?
a
Aha, yes. Java 8, sadly.
On 4.0.0, there isn’t any export that is
import com.expediagroup.graphql.SchemaGeneratorConfig
I don’t know exactly where that import will be changed, but I know that it isn’t there anymore
Same goes for
import com.expediagroup.graphql.toSchema
d
?
are you on a non-alpha version?
a
No, that was the same version I tested…or atleast thought I tested. Strange.
Literally just tried again, and now it works. No clue why it didn’t work before.
d
lol. ok
a
Severe case of pebcak I suspect 😂
🤣 1