Last active
October 25, 2019 03:59
-
-
Save OlegIlyenko/4068ad92e008cd4b5def1baa4ec3a67c to your computer and use it in GitHub Desktop.
An example of minimal self-contained snippet that reproduces specific issue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Imports that you are using | |
import sangria.schema._ | |
import sangria.execution._ | |
import sangria.macros._ | |
import sangria.marshalling.circe._ | |
import scala.concurrent.ExecutionContext.Implicits.global | |
// The schema definition | |
val QueryType = ObjectType("Query", fields[Unit, Unit]( | |
Field("hello", StringType, resolve = _ ⇒ "Hello world!") | |
)) | |
val schema = Schema(QueryType) | |
// Test query | |
val query = graphql"{ hello }" | |
val result = Executor.execute(schema, query) | |
result.foreach(res ⇒ println(res.spaces2)) | |
// Expected output: | |
// | |
// { | |
// "hello": "Hello world!" | |
// } | |
// Actual output: | |
// | |
// ??? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment