ocaml-graphql-server icon indicating copy to clipboard operation
ocaml-graphql-server copied to clipboard

Allow introspection of default args for built-in scalars

Open ozanmakes opened this issue 7 years ago • 0 comments

I made a quick attempt to add default values for arguments to the introspection query. Only covers built-in scalars for now.

I couldn't figure out if this information is already available in the introspection resolvers, so I added a new parameter to Arg.scalar. This will break backwards compatibility for people using custom scalar arguments, to avoid this I can make this argument optional. Please let me know if this is in the right direction.

Here's what it looks like in GraphiQL:

screenshot from 2018-07-24 22-33-37

ozanmakes avatar Jul 24 '18 20:07 ozanmakes