Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

graphiql #106

Merged
merged 2 commits into from Dec 3, 2019
Merged

graphiql #106

merged 2 commits into from Dec 3, 2019

Conversation

fokot
Copy link
Contributor

@fokot fokot commented Dec 2, 2019

Added graphiql to the example. It is very useful for trying out things

"/api/graphql" -> CORS(Http4sAdapter.makeRestService(interpreter)),
"/ws/graphql" -> CORS(Http4sAdapter.makeWebSocketService(interpreter))
"/ws/graphql" -> CORS(Http4sAdapter.makeWebSocketService(interpreter)),
"/graphiql" -> Kleisli.liftF(OptionT.liftF(staticResource("graphiql.html")))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code can be a bit simpler no? In https://http4s.org/v0.21/static/ it seems we can simply do something like StaticFile.fromResource("/" + file, blocker, Some(request)).getOrElseF(NotFound())

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Copy link
Owner

@ghostdogpr ghostdogpr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

@ghostdogpr ghostdogpr merged commit 6232937 into ghostdogpr:master Dec 3, 2019
@fokot fokot deleted the graphiql branch December 3, 2019 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants