How to efficiently find shortest and longest paths between node types in Dgraph (similar to APOC in Neo4j)?

Thank you for your response. I appreciate the clarity you’ve provided. I’m interested in understanding how the extract_dict function, which recursively extracts nodes and edges from a dictionary generated by a Dgraph query, can be utilized to determine both the shortest and longest paths between two nodes. Your insights on this would be very valuable.