Docblock Tags
In order for Grats to extract GraphQL schema from your code, simply mark which TypeScript structures should be included in the schema by marking them with special JSDoc tags such as /** @gqlType */
or /** @gqlField */
.
caution
JSDocs must being with /**
(two asterisk). However, they may be consolidated into a single line /** Like this */
.
info
- To learn about comment syntax, see Comment Syntax
- To learn why Grats uses comments, see Why Use Comments
Each tag maps directly to a concept in the GraphQL Schema Definition Language (SDL). The following JSDoc tags are supported:
tip
This documentation aims to be complete, but our hope is that you feel empowered to just slap one of these docblock tags on the relevant TypeScript class/type/method/etc in your code, and let Grats' helpful error messages guide you.