ALT*_*AIN 3 python-3.x strawberry-graphql
我们如何在 Strawberry GraphQL Resolver 中获取请求的字段
query {
test {
label
}
}
Run Code Online (Sandbox Code Playgroud)
如何获取label解析器中的字段?
我努力了:
info.field_nodes[0].selection_set.selections
Run Code Online (Sandbox Code Playgroud)
但它没有返回我想要的
{selection.name for field in info.selected_fields for selection in field.selections}
Run Code Online (Sandbox Code Playgroud)