Skip to content

Instantly share code, notes, and snippets.

@duanebester
Created November 26, 2019 16:31
Show Gist options
  • Save duanebester/0fe62823385a147bcb5d49f43a7a6109 to your computer and use it in GitHub Desktop.
Save duanebester/0fe62823385a147bcb5d49f43a7a6109 to your computer and use it in GitHub Desktop.
Main 2 - Update server routes
val route: Route =
(post & path("graphql")) {
entity(as[JsValue]) { requestJson =>
GraphQLServer.endpoint(requestJson)
}
} ~ {
getFromResource("graphiql.html")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment