[Question] Ignore whole models / tables
Hi,
first things first: Great work! I have a question. This there a way to completely ignore a model? This is useful e.g. for the prisma table that holdes the migrations. It will never be used within the application and is for internal purpose only. I could not find anything in the documentation so far..
Thank you
If you are not referencing this type in application it should not appear in graphql schema.
Also try @ObjectType({ isAbstract: true })
https://github.com/unlight/prisma-nestjs-graphql#objecttype
// schema.prisma
/// @ObjectType({ isAbstract: true })
model User {
id Int @id
}
https://docs.nestjs.com/graphql/resolvers#generics
Hiding it from gql is working, thanks you for the hint, and a step into the right direction. But i would prefer not to have the files at all that are generated. Something into the direction of a decorator "///@Ignore" that would skip the whole table if this is possible.
Yes it would be great if we can have /// @ignore to ignore the tables.
Agreed. The ability to ignore tables would be needed before I could use this unfortunately.