如何使用以下查询防止对 Apollo 服务器的嵌套攻击:
{
authors {
firstName
posts {
title
author {
firstName
posts{
title
author {
firstName
posts {
title
[n author]
[n post]
}
}
}
}
}
}
}
换句话说,如何限制查询中提交的递归数?这可能是一个潜在的服务器漏洞。