model JobRun {
createdAt DateTime @default(now())
endTime DateTime?
exitCode Int?
id Int @default(autoincrement()) @id
jobId Int
jobRunId Int?
moreInfo String?
startTime DateTime
status JobStatus @default(ACTIVATED)
updatedAt DateTime
Job Job @relation(fields: [jobId], references: [id])
@@unique([jobId, startTime], name: "JobRun.jobId_startTime")
}
yarn generate fails with this error:
$ ts-node --transpile-only -P nexus.tsconfig.json src/Api/nexusSchema
/home/will/code/pal/paljs-fullstack-demo/node_modules/graphql/utilities/assertValidName.js:42
return new _GraphQLError.GraphQLError("Names must match /^[_a-zA-Z][_a-zA-Z0-9]*$/ but \"".concat(name, "\" does not."), node);
^
GraphQLError: Names must match /^[_a-zA-Z][_a-zA-Z0-9]*$/ but "JobRun.jobId_startTimeCompoundUniqueInput" does not.
at isValidNameError (/home/will/code/pal/paljs-fullstack-demo/node_modules/graphql/utilities/assertValidName.js:42:12)
at Object.assertValidName (/home/will/code/pal/paljs-fullstack-demo/node_modules/graphql/utilities/assertValidName.js:21:15)
at new NexusInputObjectTypeDef (/home/will/code/pal/paljs-fullstack-demo/node_modules/@nexus/schema/src/definitions/inputObjectType.ts:30:5)
at Object.inputObjectType (/home/will/code/pal/paljs-fullstack-demo/node_modules/@nexus/schema/src/definitions/inputObjectType.ts:47:10)
at forEach (/home/will/code/pal/paljs-fullstack-demo/node_modules/@paljs/nexus/src/index.ts:67:13)
at Array.forEach (<anonymous>)
at Object.onInstall (/home/will/code/pal/paljs-fullstack-demo/node_modules/@paljs/nexus/src/index.ts:64:23)
at /home/will/code/pal/paljs-fullstack-demo/node_modules/@nexus/schema/src/builder.ts:657:44
at Array.forEach (<anonymous>)
at SchemaBuilder.beforeWalkTypes (/home/will/code/pal/paljs-fullstack-demo/node_modules/@nexus/schema/src/builder.ts:651:18)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
This model is the result of prisma introspection
yarn generate
fails with this error:Any ideas how to get around this issue?
Environment details:
@paljs/cli/2.5.2 linux-x64 node-v14.12.0