Prisma Embedded Type可以嵌套吗?一种嵌入类型在另一种嵌入类型之下?

时间:2019-05-16 09:41:51

标签: node.js mongodb mongoose graphql prisma

根据我的数据模型,prisma生成所需的突变和查询,一切工作正常,没有错误,但我找不到嵌入式类型的更新突变,仅创建突变可用。 嵌入式类型不能嵌套?

type Survey @db(name: "surveys") {
 id: ID! @id
 user: User!
 surveyDescription: String!
 surveyScore: Float!
 surveyUrl: String!
 completedPercent: Float!
 expirationDate: DateTime
 categories: [Category]! @relation(link: INLINE)
 result: [CategoryInput!]
 createdAt: DateTime! @createdAt
 updatedAt: DateTime! @updatedAt
}

type CategoryInput @embedded{
  categoryText: String!
  categoryScore: Float
  benchmarks: [BenchmarkInput!]
  questions: [QuestionInput!]
}

type BenchmarkInput @embedded{
  questionID: ID!
  score: Float!
}

type QuestionInput @embedded{
  questionID: ID!
  questionText: String!
  questionScore: Float!
  questionSkipped: Boolean @default(value: true)
  answers: [AnswerInput!]
}

type AnswerInput @embedded{
  answerText: String!
  answerScore: Float!
  answerSkipped: Boolean @default(value: true)
  tags: [TagInput!]
}

type TagInput @embedded{
  tagText: String!
  tagScore: Float!
}

我想更新嵌入式类型的查询。

0 个答案:

没有答案