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

Feature Request: Control description output #879

Open
mmmeff opened this issue Jan 12, 2023 · 3 comments
Open

Feature Request: Control description output #879

mmmeff opened this issue Jan 12, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@mmmeff
Copy link

mmmeff commented Jan 12, 2023

My API project uses TypeGraphQL to generate its schema from Prisma/Resolvers.

In TypeGraphQL, the way you control which fields of each Prisma model get included in the generated GraphQL models is by using a description annotation like: /// @TypeGraphQL.omit(input: true, output: true)

When generating json-schema using this library, we see descriptions on models like so:

"id": {
  "type": "string",
  "description": "@TypeGraphQL.omit(input: true)"
}

It would be great if I could add a pattern to omit descriptions in the generated json-schema or at least disable them outright.

@valentinpalkovic
Copy link
Owner

@mmmeff Do you have a friendly solution in mind? Like defining an ignoreComment field, which might accept a list of strings, and the description will be omitted as soon as the string is detected? Do you think this would work for your needs?

@valentinpalkovic valentinpalkovic added the enhancement New feature or request label Jan 20, 2023
@mmmeff
Copy link
Author

mmmeff commented Feb 21, 2023

@valentinpalkovic Either a list of strings or regexes would be fantastic, yeah!

@valentinpalkovic
Copy link
Owner

Would you like to work on a solution to implement this feature? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants