5 Formatting results

This chapter covers

  • Retrieving values from our vertices and edges
  • Aliasing vertices and edges for later use in the traversal
  • Crafting custom result objects by combining static and computed values
  • Sorting, grouping, and limiting our results

Finding data within the graph is one skill, but returning it efficiently presents a whole new set of challenges. While it’s entirely possible to send raw, unorganized data to the client, in most cases, it’s best to do as much data processing at the database layer as possible. Client applications are quite busy handling user interactions.

In this chapter, we’ll focus on the different methods of collecting, formatting, and outputting traversal results at the database level. We’ll review ...

Get Graph Databases in Action now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.