Crafting Markdown documentation for root queries and mutations
For the types and inputs, it is sufficient to provide short textual documentation. However, for Markdown documentation, we should include more detailed information for the schema consumer. This way, they can easily select the right operation for the desired purpose. While you may think it can bloat the schema, remember the schema is mainly for the schema consumer and their understanding.
We will begin by describing our root Query
type:
type Query{ """ Search for questions based on a query string. It will search through the question titles and respond with an array of questions paired with the most voted answer. You can even search for a topic, like this: ```gql query Search{ search(query: "space"){ question{ ...