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

Support for circe json scalar #176

Merged
merged 4 commits into from
Jan 28, 2020
Merged

Support for circe json scalar #176

merged 4 commits into from
Jan 28, 2020

Conversation

ghostdogpr
Copy link
Owner

@ghostdogpr ghostdogpr commented Jan 26, 2020

Fixes #167

Requires import caliban.interop.circe.json._.

Copy link
Contributor

@fokot fokot left a comment

Choose a reason for hiding this comment

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

I tested it and it can not return Json object value.
This does not work

args => H(123, io.circe.parser.parse("{\"a\": 333}").right.get)

and fails with
"java.lang.ClassCastException: caliban.InputValue$ObjectValue cannot be cast to caliban.ResponseValue"
This works tough

args => H(123, Json.fromString("aaa"))

core/src/main/scala/caliban/interop/circe/circe.scala Outdated Show resolved Hide resolved
core/src/main/scala/caliban/interop/circe/circe.scala Outdated Show resolved Hide resolved
@ghostdogpr
Copy link
Owner Author

@fokot oops, thanks for testing, I made a copy/paste mistake. Will fix right now and add a test.

@ghostdogpr
Copy link
Owner Author

@fokot should be OK now!

Copy link
Contributor

@fokot fokot left a comment

Choose a reason for hiding this comment

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

It is working now 👍 Thank you @ghostdogpr

@ghostdogpr ghostdogpr merged commit ac52b2b into master Jan 28, 2020
@ghostdogpr ghostdogpr deleted the json-scalar branch January 28, 2020 11:19
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.

Support of JSON scalar type.
2 participants