blob: fca8abb4fe793eae8ee327998bd3a04fa7ae577c [file] [log] [blame]
from graphql import GraphQLResolveInfo
def info_to_path(info: GraphQLResolveInfo) -> str:
""" "Get the full path of current endpoint by GraphQLResolveInfo."""
node = info.path
full_path = node.key
while node.prev:
node = node.prev
if not isinstance(node.key, int):
full_path = f"{node.key}.{full_path}"
return full_path