简体   繁体   English

在石墨烯中间件中访问节点的完整路径

[英]Accessing node's full path in graphene middleware

I am trying to add some logging to my graphene server utilizing a middleware.我正在尝试使用中间件向我的石墨烯服务器添加一些日志记录。 As per the documentation ( Docs - 3.2.3 ), I can view some limited path info from the parent by pulling out the name from the root's meta node ( root._meta.name which will result in Ex. Three.Four ), but I am looking to get the full path of the current node being resolved ( One.Two.Three.Four ).根据文档( Docs - 3.2.3 ),我可以通过从根的元节点( root._meta.name这将导致 Ex. Three.Four )中拉出名称来查看来自父级的一些有限路径信息,但是我希望获得正在解析的当前节点的完整路径( One.Two.Three.Four )。 Is there any way to access this info through the middleware?有没有办法通过中间件访问此信息?

You can use info.path to get this.您可以使用info.path来获取它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM