Closed dwwoelfel closed 4 years ago
Thanks for writing up #31 and implementing this change 🙏
From a conceptual point of view, I would prefer an approach where defining an input scalar (i.e. calling Arg.scalar
) would require a providing function 'a -> Graphql_parser.const_value
. However, as you note in #31, there are some difficulties with this for input object types that I haven't worked out yet. What you propose seems quite pragmatic until that's sorted out.
Per https://github.com/andreas/ocaml-graphql-server/issues/31#issuecomment-674311844, changes the type of the
~default
argument inarg'
toGraphql_parser.const_value
to make it possible to populate thedefaultValue
field in the introspection query.