You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a prisma model contains only one single Int field which is omitted using /// @TypeGraphQL.omit(output: true, input: true), the following error occurs when generating the graphql schema:
> @ start /Users/luca/Projects/libraries/typegraphql-prisma/examples/4-nest-js
> ts-node --transpile-only ./index.ts
[Nest] 66831 - 07.02.2022, 23:17:42 LOG [NestFactory] Starting Nest application...
[Nest] 66831 - 07.02.2022, 23:17:42 LOG [InstanceLoader] AppModule dependencies initialized +39ms
[Nest] 66831 - 07.02.2022, 23:17:42 ERROR [ExceptionHandler] Some errors occurred while generating GraphQL schema:
Input Object type PostAvgOrderByAggregateInput must define one or more fields.
, Input Object type PostSumOrderByAggregateInput must define one or more fields.
Please check the `details` property of the error to get more detailed info.
Error: Some errors occurred while generating GraphQL schema:
Input Object type PostAvgOrderByAggregateInput must define one or more fields.
, Input Object type PostSumOrderByAggregateInput must define one or more fields.
Please check the `details` property of the error to get more detailed info.
at Function.generateFromMetadata (/Users/luca/Projects/libraries/typegraphql-prisma/examples/4-nest-js/node_modules/type-graphql/dist/schema/schema-generator.js:20:23)
at async Object.buildSchema (/Users/luca/Projects/libraries/typegraphql-prisma/examples/4-nest-js/node_modules/type-graphql/dist/utils/buildSchema.js:10:20)
To Reproduce
I have created a pull request in my fork of this repository to reproduce the bug, see luca-rath#1
Expected Behavior
There should be no error
Environment (please complete the following information):
OS: macOS Monterey 12.2
Node 14.19.0
typegraphql-prisma version 0.18.4
Prisma version 3.8.1
TypeScript version 4.5.5
The text was updated successfully, but these errors were encountered:
Sorry, I expressed myself wrong ... The model contains multiple fields with types other than Int and only one single field with type Int, which is omitted using the comment
Describe the Bug
If a prisma model contains only one single
Int
field which is omitted using/// @TypeGraphQL.omit(output: true, input: true)
, the following error occurs when generating the graphql schema:To Reproduce
I have created a pull request in my fork of this repository to reproduce the bug, see luca-rath#1
Expected Behavior
There should be no error
Environment (please complete the following information):
typegraphql-prisma
version 0.18.4The text was updated successfully, but these errors were encountered: