Docblock tags
To build a GraphQL schema from your code, mark the TypeScript declarations the schema should include with special JSDoc tags, such as /** @gqlType */ or /** @gqlField */.
Caution
JSDoc comments must begin with /** (two asterisks). They may be written on a single line, /** Like this */.
Info
- To learn about comment syntax, see Comment syntax.
- To learn why Gratos uses comments, see Why use comments?
Each tag maps directly to a concept of the GraphQL Schema Definition Language (SDL). These are the JSDoc tags:
Tip
These pages aim to be complete, but we hope you feel free to just put one of these docblock tags on the relevant TypeScript class, type, method or function, and let Gratos' error messages guide you.