We recommend documenting every item in your GraphQL scheme. If you put comments above every type, field, argument and enum value definition, Litho will automatically show them in code completions and when you hover over a word in VS Code.
""" This type represents one of the many species of droids in Star Wars. """ type Droid { "This is the name of this droid." name: String! }
It’s important to note that (unlike regular comments), comments used for documentation in GraphQL are actually (multi-line) string literals.
Regular comments (starting with
#
) are not used for documentation and not indexed by Litho.Keep in mind that GraphQL does not support comments on type extensions themselves.
"This comment is not allowed." extend type Example { "But this comment is allowed." allowed: Boolean! }