Olivier Refalo
Olivier Refalo

Reputation: 51435

Documenting GraphQL short-hand model

How does one document the model, using GraphQL shorthand notation?

type User { name: String }

Say I want to add a description for the type/attribute above.

Upvotes: 0

Views: 60

Answers (1)

CommonsWare
CommonsWare

Reputation: 1006554

Descriptions come in the form of comments:

# Someone who uses something
type User {
  # How we refer to the user
  name: String
}

Those should be added as descriptions to the schema generated from this notation.

Upvotes: 2

Related Questions