Ok this might sound stupid but I am very new to graphql and dgraph. My schema is as followed
type FormQuestion {
id: Int
UUID: String! @search(by:[exact])
projectID: ProjectEntry @hasInverse(field: "questions")
title: String
type: String
required: Boolean
options: [String]
multi: Boolean
}
type ProjectEntry {
UUID: String! @id
type: Int
name: String @search(by:[exact])
description: String
createdAt: DateTime
updatedAt: DateTime
owner: String @search(by:[exact])
color: String
collaborators: [String] @search(by:[exact])
submitDescription: String
imageTitle: String
formDescription: String
questions: [FormQuestion!]
title: String
image: String
authentication: String
password: String
}
In my code I use, the below code to attempt to delete all FormQuestion, now I know this is wrong but how do i delete them, without going through each ID and deleting them.
mutation MyQuery {
updateProjectEntry(input: {filter: {UUID: {eq: "23a8b593-27a6-4a6c-8bd5-2ec6da2a2c4c"}}, set: {questions: []}}) {
numUids
}
}
– Harvey