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

Can Schema.interface propagate docs down to implementations?

Open phated opened this issue 5 years ago • 1 comments

Since abstract_field can receive a ~doc argument, would it be possible to provide that as a default for each implementation in the introspection query? This would be helpful to avoid duplicating documentation between abstract_field and field.

phated avatar Mar 28 '19 22:03 phated

Thanks for the suggestion! I think it should be possible, though I'm wondering whether an implementation should be allowed to not inherit the doc string, and how to achieve this (optional argument ?propagate_doc for Schema.add_type?). It could probably be a convenient feature, but personally I have other features higher on my wish list 😄

andreas avatar Mar 29 '19 09:03 andreas