Skip to content

Allow omitting param documentation without showing bold "Not Documented" #10

@menewman

Description

@menewman

Copied from the issue I wrote here:
GraphiDocsOrg/docs#29

Original text below:


Screen Shot 2019-03-22 at 3 25 08 PM

^Something about the bold [Not documented] here feels like a rebuke to me. 😅 In general it's good to document all fields, but in some cases (like the screenshot's example) the meaning of a param may be very obvious and okay to omit. As a result, if documentation is missing for parameters, it would be nice to simply show something like this:

# Query a company by ID.
company(id: ID!): Company

That way we don't have to write very redundant docstrings that look like this:

  """
  Query a company by ID.
  """
  company(
    """
    The ID of the company to query.
    """
    id: ID!
  ): Company

...or generate documentation that looks incomplete, especially if it will be shared externally. (If it's for our own internal dev team then it's probably okay!) For now, redundant docstrings seem to be the way to go, but it would be nice to just omit undocumented params entirely so that they don't stand out so much.

Complications:
What to do if some params are omitted and others are not? In that case, maybe just show the name without anything else?

# Query a company by ID.

# Arguments
# id
# someOtherArg: This is an additional argument with some purpose. 
company(id: ID!, someOtherArg: SomeOtherType): Company

Or omit the undocumented ones?

# Query a company by ID.

# Arguments
# someOtherArg: This is an additional argument with some purpose. 
company(id: ID!, someOtherArg: SomeOtherType): Company

Or just show something slightly less obtrusive that isn't in bold?

# Query a company by ID.

# Arguments
# id: -
# someOtherArg: This is an additional argument with some purpose. 
company(id: ID!, someOtherArg: SomeOtherType): Company

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions