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
The generator becomes unhappy about relation tables without additional params. Completely possible that this is expected behaviour but I don't believe the GraphQL spec requires mutations to have args. That said, the mutation should probably just not be generated.
/home/bcksl/repo/tgql-demo/node_modules/type-graphql/dist/schema/schema-generator.js:20
throw new errors_1.GeneratingSchemaError(errors);
^
GeneratingSchemaError: Some errors occurred while generating GraphQL schema:
Input Object type UsersPostsUpdateManyMutationInput must define one or more fields.
Please check the `details` property of the error to get more detailed info.
at Function.generateFromMetadata (/home/bcksl/repo/tgql-demo/node_modules/type-graphql/dist/schema/schema-generator.js:20:23)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async buildSchema (/home/bcksl/repo/tgql-demo/node_modules/type-graphql/dist/utils/buildSchema.js:11:20)
at async /home/bcksl/repo/tgql-demo/src/index.ts:31:18 {
details: [
GraphQLError: Input Object type UsersPostsUpdateManyMutationInput must define one or more fields.
at SchemaValidationContext.reportError (/home/bcksl/repo/tgql-demo/node_modules/graphql/type/validate.js:73:7)
at validateInputFields (/home/bcksl/repo/tgql-demo/node_modules/graphql/type/validate.js:532:13)
at validateTypes (/home/bcksl/repo/tgql-demo/node_modules/graphql/type/validate.js:260:7)
at validateSchema (/home/bcksl/repo/tgql-demo/node_modules/graphql/type/validate.js:43:3)
at graphqlImpl (/home/bcksl/repo/tgql-demo/node_modules/graphql/graphql.js:60:63)
at /home/bcksl/repo/tgql-demo/node_modules/graphql/graphql.js:23:43
at new Promise (<anonymous>)
at graphql (/home/bcksl/repo/tgql-demo/node_modules/graphql/graphql.js:23:10)
at Function.generateFromMetadata (/home/bcksl/repo/tgql-demo/node_modules/type-graphql/dist/schema/schema-generator.js:18:60)
at buildSchema (/home/bcksl/repo/tgql-demo/node_modules/type-graphql/dist/utils/buildSchema.js:11:61) {
path: undefined,
locations: undefined,
extensions: [Object: null prototype] {}
}
]
}
The generator becomes unhappy about relation tables without additional params. Completely possible that this is expected behaviour but I don't believe the GraphQL spec requires mutations to have args. That said, the mutation should probably just not be generated.
Doesn't work:
Works:
v16.19.0
typegraphql-prisma
version2.0.0-beta.1
4.10.1
4.9.5
The text was updated successfully, but these errors were encountered: