Created
January 9, 2017 08:49
-
-
Save bruce/9e9f26a278aefd462dff40cd5cf4853c to your computer and use it in GitHub Desktop.
Showing float serialization to non-string
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
defmodule TestSchema do | |
use Absinthe.Schema | |
query do | |
field :hello, :float do | |
resolve fn _, _, _ -> {:ok, 1.3} end | |
end | |
end | |
end | |
{:ok, result} = Absinthe.run("{ hello }", Tester) | |
~s({"data":{"hello":1.3}}) = Poison.encode!(result) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment