-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Copied from the issue I wrote here:
GraphiDocsOrg/docs#29
Original text below:
^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