/
Descriptions
To view this content, buy the book! 😃🙏
Or if you’ve already purchased.
Descriptions
We can add a description before any definition in our schema using "
or """
. Descriptions are included in introspection and displayed by tools like GraphiQL. Some libraries (like graphql-tools
) also treat comments-lines that start with #
-as descriptions, even though according to the spec they’re supposed to be ignored.
type Query {
"have the server say hello to whomever you want!"
hello(
"person to say hello to"
name: String!
): String
}
"""
multiline description
of the User type
"""
type User {
id: Int
email: String
}