Skip to content

Commit 70e8213

Browse files
committed
Fixed Kotlin Test server for schema query
1 parent 56be9d4 commit 70e8213

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/test/kotlin/GraphQLServer.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ fun main() {
3939
val graphql = Translator(graphQLSchema)
4040
fun translate(query:String) = graphql.translate(query)
4141

42-
val driver = GraphDatabase.driver("bolt://localhost",AuthTokens.basic("neo4j","password"))
42+
val driver = GraphDatabase.driver("bolt://localhost",AuthTokens.basic("neo4j","test"))
4343
fun run(cypher:Translator.Cypher) = driver.session().use {
4444
println(cypher.query)
4545
println(cypher.params)
@@ -64,7 +64,7 @@ fun main() {
6464

6565
fun handler(req: Request, res: Response) = query(req.body()).let { query ->
6666
if (query.contains("__schema"))
67-
build.execute(query).let { println(it.errors);it.getData<Any>() }
67+
build.execute(query).let { println(render(it));it }
6868
else run(translate(query).first()) }
6969

7070
Spark.post("/graphql","application/json", ::handler, ::render)

0 commit comments

Comments
 (0)