问题描述
https://dgraph.io/tour/schema/8/
现在,我想删除给定类型节点的所有三元组。我假设这是通过查询的某种组合完成的,该查询选择给定类型的节点,然后为每个这些节点进行突变。在本教程中找不到该示例。
我知道如何为节点选择uid:
{
query(func: has(<dgraph.type>)) @filter(eq(<dgraph.type>,"Country")) {
uid
}
}
但是我该如何结合突变呢?
https://discuss.dgraph.io/t/how-to-bulk-delete-nodes-or-cascade-delete-nodes/7308
似乎要求“ upsert”
解决方法
以下更新似乎有效:
<style>
*{
padding: 0;
margin: 0;
font-family:"Segoe UI",Tahoma,Geneva,Verdana,sans-serif
}
.recover a {
display: flex;
align-items: center;
justify-content: space-around;
text-decoration: none;
font-weight: 500;
width: 50%;
height: 20%;
background: #00a761;
color: white;
font-size: 15px;
}
.recover a:hover {
background: #00d67d;
}
.recover h1 {
color: white;
margin-bottom: 1%;
}
.recover p {
color: #afafaf;
width: 50%;
text-align: center;
margin-bottom: 1%;
}
.recoverall .recover{
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
border-radius: 5px;
width: 80%;
height: 250px;
background: #292929;
}
.recoverall{
display: flex;
justify-content: space-around;
background: #070707;
width: 100%;
height: 100vh;
padding-top: 5%;
}
@media screen and (max-width: 768px) {
.recover h1 {
font-size: 15px;
}
.recoverall {
width: 100%;
}
.recover p {
font-size: 10px;
width: 95%;
}
.recover a {
width: 70%;
}
}
</style>
<body>
<table class="recoverall" border="1" cellpadding="0" cellspacing="0" width="100%">
<tbody class="recover"><tr>
<td>
<h1>Recover Your Password</h1>
</td>
</tr>
<tr>
<td>
<p>
We Have Recive a request Fom this Account to reset Your password,if
you have not sent this request ignore,but if You Are the One that
sent it,Click the button Below
</p>
</td>
</tr>
<tr>
<td>
<a href='XXX'>Click Here To Continue</a>
</td>
</tr>
</tbody></table>
</body>