Server
Description

Description

By adding a description to a resolver, you enrich its metadata. As a result, TypeScript on the client side can incorporate this description into the generated query and mutation types. This practice enhances code readability and maintainability by providing meaningful descriptions directly within the client-side code, aiding developers in understanding the purpose and functionality of each PTSQ endpoint.

Description works the same with or without introspection.

resolver.description('Returns user from database by user id');

The description can be overwritten by calling the description method again.

resolver.description('A').description('B'); // B