AbsintheUtils.Scalars.JSON (absinthe_utils v0.0.1-main-72f3aaa55e5beeeb85467282d2d97db0eb3f4f43)
View SourceThe JSON scalar type allows arbitrary JSON values to be passed in and out.
Requires { :jason, ">= 1.1" }
package: https://github.com/michalmuskala/jason
Based in the recipes on Absinthe's wiki
Note that even if you use non_null(:json)
a string of null value ("null"
) is still accepted.
Usage:
Import the type in your schema import_types(AbsintheUtils.Scalars.JSON)
and you will be able
to use the :json
type.