Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(jsdoc): docPropagation docs #55

Merged
merged 4 commits into from
May 25, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ You are able to control certain aspects of the Nexus Prisma code generation.

##### `docPropagation.JSDoc: boolean`

- **`@summary`** Should Prisma Schema docs propagate as JSdoc?
- **`@summary`** Should Prisma Schema docs propagate as JSDoc?
- **`@default`** `true`

##### `docPropagation.GraphQLDocs: boolean`
Expand Down
15 changes: 12 additions & 3 deletions src/generator/gentime/settingsSingleton.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,26 @@ export namespace Gentime {
*/
projectIdIntToGraphQL?: 'ID' | 'Int'
/**
jasonkuhrt marked this conversation as resolved.
Show resolved Hide resolved
* TODO
* Should Prisma Schema docs propagate as docs?
*
* @default `true`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @default `true`
* @default true

JSDoc doesn't accept backticks here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to show some examples of the effect when it is off vs on.

JSDoc @example only allows JS source code so might need some exploration on how best to do this. For example instead of using @example tag using markdown code blocks.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to use markdown code blocks but @homer0/prettier-plugin-jsdoc breaks the formatting of code.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, please just leave that as a // TODO ... comment for now 🙏

This PR still brings incremental value. Let's not block just b/c its not 100%.

*/
docPropagation?:
| boolean
| {
/**
* TODO
* Should Prisma Schema docs propagate as JSDoc?
*
* @default `true`
jasonkuhrt marked this conversation as resolved.
Show resolved Hide resolved
*/
JSDoc?: boolean
/**
* TODO
* Should Prisma Schema docs propagate as GraphQL docs?
*
* @remarks When this is disabled it will force `.description` property to be `undefined`. This
* is for convenience, allowing you to avoid post-generation data manipulation or
* consumption contortions.
* @default `true`
jasonkuhrt marked this conversation as resolved.
Show resolved Hide resolved
*/
GraphQLDocs?: boolean
}
Expand Down