GraphLooker gives you the ability to work with enormous amounts of data, which means it can be difficult to learn anything about your subgraphs just by querying and glancing at it. Sorting and filtering are two tools that let you customize how you organize and view your data, making it more convenient to work with. In this, you'll learn how to sort and filter subgraph data from UI.
Throughout this tutorial, we will be using a Uniswap V2 subgraph. If you would like to follow along, click on the following link
Sorting records means arranging them logically, with similar data grouped. In GraphLooker, records are by default sorted by ID. For example, the information in a subgraph belonging to a DeFi Dapp could be sorted in several ways:
Text and numbers can both be sorted in ascending or descending order. Accordingly, an ascending sort will arrange numbers from smallest to largest and text from A to Z. In the text, descending means going from Z to A or largest to smallest. Here, ID numbers are sorted by default in the most recent order, which is why the most recent ID numbers appear first.
Let’s show you an example
The above image shows the default setup of data presented by GraphLooker after you input endpoint.
Now we sort the volume in descending order i.e. higher to lower
The above image now shows Uniswap Token data sorted by ID.
Filters allow you to view only the data that you are interested in. When creating a filter, you set criteria for the data you want to display. The filter also searches all of the records, finds the ones that meet your search criteria and showcases them on your screen